InstrumentDetails

class saxo_openapi.endpoints.referencedata.instruments.InstrumentDetails(Uic, AssetType, params=None)

Get detailed information for a specific instrument.

ENDPOINT = 'openapi/ref/v1/instruments/details/{Uic}/{AssetType}'
EXPECTED_STATUS = 200
METHOD = 'GET'
__init__(Uic, AssetType, params=None)

Instantiate an InstrumentDetails request.

Parameters:
  • Uic (int (required)) – the Uic of the instrument
  • AssetType (string (required)) – the AssetType specification
  • params (dict (optional)) – dict representing querystring parameters
>>> import json
>>> import saxo_openapi
>>> import saxo_openapi.endpoints.referencedata as rd
>>> client = saxo_openapi.API(access_token=...)
>>> Uic = 22
>>> AssetType = 'FxSpot'
>>> params =
        {
          "AccountKey": "Cf4xZWiYL6W1nMKpygBLLA=="
        }
>>> r = rd.instruments.InstrumentDetails(Uic=Uic,
...                                      AssetType=AssetType,
...                                      params=params)
>>> client.request(r)
>>> print(json.dumps(r.response, indent=4))

Output:

{
  "AmountDecimals": 6,
  "AssetType": "FxForwards",
  "CurrencyCode": "CAD",
  "DefaultAmount": 100000,
  "DefaultSlippage": 0.01,
  "DefaultSlippageType": "Percentage",
  "Description": "British Pound/Canadian Dollar",
  "Exchange": {
    "CountryCode": "DK",
    "ExchangeId": "SBFX",
    "Name": "Inter Bank"
  },
  "Format": {
    "Decimals": 4,
    "Format": "AllowDecimalPips",
    "OrderDecimals": 4
  },
  "FxForwardMaxForwardDate": "2020-03-10T00:00:00.000000Z",
  "FxForwardMinForwardDate": "2019-03-06T00:00:00.000000Z",
  "FxSpotDate": "2019-03-06T00:00:00.000000Z",
  "GroupId": 0,
  "IncrementSize": 5000,
  "IsTradable": true,
  "MinimumTradeSize": 1000,
  "OrderDistances": {
    "EntryDefaultDistance": 0.5,
    "EntryDefaultDistanceType": "Percentage",
    "StopLimitDefaultDistance": 5,
    "StopLimitDefaultDistanceType": "Pips",
    "StopLossDefaultDistance": 50,
    "StopLossDefaultDistanceType": "Pips",
    "StopLossDefaultEnabled": false,
    "StopLossDefaultOrderType": "Stop",
    "TakeProfitDefaultDistance": 50,
    "TakeProfitDefaultDistanceType": "Pips",
    "TakeProfitDefaultEnabled": false
  },
  "StandardAmounts": [
    10000,
    50000,
    100000,
    250000,
    500000,
    1000000,
    2000000,
    5000000,
    10000000,
    20000000
  ],
  "SupportedOrderTypes": [
    "Market",
    "Limit",
    "Stop",
    "TrailingStop",
    "StopLimit"
  ],
  "Symbol": "GBPCAD",
  "TickSize": 0.0001,
  "TickSizeLimitOrder": 0.0001,
  "TickSizeStopOrder": 5e-05,
  "TradableAs": [
    "FxSpot",
    "FxForwards",
    "FxVanillaOption",
    "FxKnockInOption",
    "FxKnockOutOption"
  ],
  "TradableOn": [
    "9226397"
  ],
  "TradingSignals": "NotAllowed",
  "Uic": 23
}
expected_status
response

response - get the response of the request.

status_code