Data Formats
The API will enforce input validation and reject requests that are not providing data in correct formats (with HTTP status code 400 - Bad Request).
Likewise the API will deliver response data in a consistently manner according to the data types.
JSON is currently the only supported format, which by nature is fairly lenient, but in order to ensure a consistent API, most data types are only accepted in one or a few formats.
Simple Types
Type | Accepted Format(s) | Examples |
|---|---|---|
| Integer | Number, no quotes, no digit grouping | 1 1000 1000000
|
| Decimal | Number with decimals, no quotes, no digit grouping | 1.0 1000.55 1000000.55
|
| String | String with quote at beginning and at end, null and white-space values are not accepted | "string" |
| Boolean | No quotes | true false |
| Guid | No hexadecimal, no brackets | "00000000-0000-0000-0000-000000000000" "00000000000000000000000000000000" |
| Enumerations | String equivalent, no numbers | "FxSpot" |
Derived Types
Type | Accepted Format(s) | Examples |
|---|---|---|
| AccountGroupId | String | |
| AccountGroupKey | String | |
| AccountId | String | |
| AccountKey | String | |
| Amount | Integer or Decimal | 100 1.45 |
| AssetType | Enumeration | |
| ClientId | Integer | |
| ClientKey | String | |
| CountryCode | String - 2 upper case letters | DK |
| CurrenyCode | String - 3 upper case letters | EUR |
| ExchangeId | String | |
| LanguageCode | String - must match two lower case letters and optionally a dash + two upper case letters | en en-US |
| OrderId | String | |
| Percentage | Decimal | 0.25 |
| PositionId | String | |
| SectorId | Integer | 1 |
| Symbol | String | "EURUSD" |
| Uic | Integer | 1 |
| UserId | Integer (currently String) | 1 |
| UserKey | String | |
| UtcDate | String, with format: yyyy-MM-dd | 2017-02-06 |
| UtcDateTime | Formats: yyyy-MM-ddTHH:mm:ss yyyy-MM-ddTHH:mm:ss.fff yyyy-MM-ddTHH:mm:ss.ffffff Also, Z is allowed at the end of each of the above formats (optional, since all UtcDateTime values are by definition in UTC) | 2017-02-06T14;37:21 2017-02-06T14;37:21.101 2017-02-06T14;37:21.101028 |