-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
Hello,
My data entries are incorrect for the configuration class. For privacy, I have replaced the characters with 'x'. I can't run the samples as the executions end at the account-related codes. Please help me. Thank you 👍
public class Config {
private Config() {}
public static final String URL = "api-fxpractice.oanda.com";
public static final String TOKEN = "xxx-xxx";
public static final AccountID ACCOUNTID = new AccountID("xxx-xxx-xxxxxxx-xxx");
public static final InstrumentName INSTRUMENT = new InstrumentName("EUR_USD");
}For AccountUpdateLoop, the program ends here:
public class AccountUpdateLoop {
public static void main(String[] args) {
Context ctx = new Context(Config.URL, Config.TOKEN);
AccountID accountId = Config.ACCOUNTID;
// Get initial account state
try {
AccountGetResponse accountStateResponse = ctx.account.get(accountId);For TestTradesAndOrders, the program ends here:
private void runTest() throws ExecuteException, RequestException
{
System.out.println("TEST - GET /accounts");
System.out.println("CHECK 200 - The list of authorized AccoungetInstrumentsts has been provided, expecting "+accountId+" in list.");
List<AccountProperties> accountProperties = ctx.account.list().getAccounts();For StepByStepOrder, the program ends here:
public abstract class StepByStepOrder {
public static void main(String[] args) {
Context ctx = new Context(Config.URL, Config.TOKEN);
AccountID accountId = Config.ACCOUNTID;
InstrumentName tradeableInstrument = Config.INSTRUMENT;
// EXAMPLE: No parameters
System.out.println("Make sure we have a valid account");
try {
// Execute the request and obtain a response object
AccountListResponse response = ctx.account.list();Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels