Windows console mode program demonstrates connectivity with Oanda trade server, using WinINet functions.
Switch branches/tags
Nothing to show
Clone or download
Latest commit d2cbef3 Aug 28, 2014
Failed to load latest commit information.
LICENSE Initial commit Jul 17, 2014
OTest.cpp Update OTest.cpp Aug 16, 2014
README.txt Update README.txt Aug 28, 2014


OTest is a Windows console mode program that demonstrates connectivity with Oanda trade 
server. OTest gets a single quote from
instruments=EUR_USD, opens a trade at
<your_account_number>/orders, displays open trades, closes the oldest open trade, and 
then displays streaming quotes from
accountId=<your_account_number>&instruments=EUR_USD. All output is to the screen in a 
Windows console window, and to output.txt.

Compiler and Project Settings

OTest runs in a Windows console window and is launched from the command prompt. It is 
designed to be compliled as a C++ Win32 console mode program in Microsoft Visual Studio 
Express 2013, which can be downloaded from Microsoft; registration to use that compiler 
is free. Necessary Project settings: no precompiled headers, add wininet.lib to the list 
of Additional Dependencies under Project Properties\Linker Input, and set the Character 
Set to single byte characters ("Not Set"). The compiler will issue warnings about 
insecurity of C library functions, but that is ok because we are being careful and
are using single-byte characters. To suppress the warnings, add _CRT_SECURE_NO_WARNINGS
to the list of C/C++ Preprocessor Definitions. Replace all instances of
<your_account_number> in the source code with your FxTrade Practice account number,
and replace all instances of <your_access_token> with your FxTrade Practice access
token, both without the corner brackets.