Skip to content

Commit

Permalink
Auto-generated v20 API changes
Browse files Browse the repository at this point in the history
  • Loading branch information
OANDA-API committed Sep 28, 2018
1 parent c429ca6 commit d8ccb9a
Show file tree
Hide file tree
Showing 12 changed files with 980 additions and 263 deletions.
18 changes: 18 additions & 0 deletions src/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
OANDA v20 API Change Log

Version 3.0.25 (September 28, 2018)

* All - Added orderBook and PositionBook endpoints. Issue#29
(https://github.com/oanda/v20-python/issues/29)


Version 3.0.24 (May 11, 2018)

* Java - Added support for Accept-Datetime-Format and additional
custom headers. Issue#8 (https://github.com/oanda/v20-java/issues/8)


Version 3.0.23 (May 04, 2018)

* Java - Fixed using null in a TradeSetDependentOrdersRequest Issue#7
(https://github.com/oanda/v20-java/issues/7)


Version 3.0.22 (April 11, 2018)

* Various documentation and example improvements
Expand Down
22 changes: 22 additions & 0 deletions src/account.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,13 @@ const Account_Properties = [
'primitive',
'boolean'
),
new Property(
'lastOrderFillTimestamp',
"Last Order Fill timestamp.",
"The date/time of the last order that was filled for this account.",
'primitive',
'primitives.DateTime'
),
new Property(
'unrealizedPL',
"Unrealized Profit/Loss",
Expand Down Expand Up @@ -379,6 +386,10 @@ class Account extends Definition {
this.hedgingEnabled = data['hedgingEnabled'];
}

if (data['lastOrderFillTimestamp'] !== undefined) {
this.lastOrderFillTimestamp = data['lastOrderFillTimestamp'];
}

if (data['unrealizedPL'] !== undefined) {
this.unrealizedPL = data['unrealizedPL'];
}
Expand Down Expand Up @@ -843,6 +854,13 @@ const AccountSummary_Properties = [
'primitive',
'boolean'
),
new Property(
'lastOrderFillTimestamp',
"Last Order Fill timestamp.",
"The date/time of the last order that was filled for this account.",
'primitive',
'primitives.DateTime'
),
new Property(
'unrealizedPL',
"Unrealized Profit/Loss",
Expand Down Expand Up @@ -1039,6 +1057,10 @@ class AccountSummary extends Definition {
this.hedgingEnabled = data['hedgingEnabled'];
}

if (data['lastOrderFillTimestamp'] !== undefined) {
this.lastOrderFillTimestamp = data['lastOrderFillTimestamp'];
}

if (data['unrealizedPL'] !== undefined) {
this.unrealizedPL = data['unrealizedPL'];
}
Expand Down
32 changes: 17 additions & 15 deletions src/context.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@

"use strict";

var account = require("./account");
var order = require("./order");
var instrument = require("./instrument");
var position = require("./position");
var user = require("./user");
var trade = require("./trade");
var site = require("./site");
var primitives = require("./primitives");
var account = require("./account");
var transaction = require("./transaction");
var user = require("./user");
var pricing = require("./pricing");
var primitives = require("./primitives");
var site = require("./site");
var trade = require("./trade");
var instrument = require("./instrument");
var order = require("./order");
var pricing_common = require("./pricing_common");


class Response {
Expand Down Expand Up @@ -67,7 +68,7 @@ class Context {

this.headers = {
"Content-Type": "application/json",
"OANDA-Agent" : `v20-javascript/3.0.22 (${application})`
"OANDA-Agent" : `v20-javascript/3.0.25 (${application})`
};

this.token = "";
Expand All @@ -81,16 +82,17 @@ class Context {
this.http = require('http');
}

this.account = new account.EntitySpec(this);
this.order = new order.EntitySpec(this);
this.instrument = new instrument.EntitySpec(this);
this.position = new position.EntitySpec(this);
this.user = new user.EntitySpec(this);
this.trade = new trade.EntitySpec(this);
this.site = new site.EntitySpec(this);
this.primitives = new primitives.EntitySpec(this);
this.account = new account.EntitySpec(this);
this.transaction = new transaction.EntitySpec(this);
this.user = new user.EntitySpec(this);
this.pricing = new pricing.EntitySpec(this);
this.primitives = new primitives.EntitySpec(this);
this.site = new site.EntitySpec(this);
this.trade = new trade.EntitySpec(this);
this.instrument = new instrument.EntitySpec(this);
this.order = new order.EntitySpec(this);
this.pricing_common = new pricing_common.EntitySpec(this);
}

setToken(token) {
Expand Down
Loading

0 comments on commit d8ccb9a

Please sign in to comment.