InfoPrices

class saxo_openapi.endpoints.trading.infoprices.InfoPrices(params)

Gets a list of info prices for a list of instruments using the specified parameters.

ENDPOINT = 'openapi/trade/v1/infoprices/list'
EXPECTED_STATUS = 200
METHOD = 'GET'
__init__(params)

Instantiate an InfoPrices request.

Parameters:params (dict (required)) – dict representing the querystring parameters.
>>> import saxo_openapi
>>> import saxo_openapi.endpoints.trading as tr
>>> import json
>>> client = saxo_openapi.API(access_token=...)
>>> params =
        {
          "Uics": "22,23",
          "AccountKey": "1a463418-88d4-4555-92e3-e6004d675245",
          "<other-parms>": "..."
        }
>>> r = tr.infoprices.InfoPrices(params=params)
>>> client.request(r)
>>> print(json.dumps(r.response, indent=4))

Output:

{
  "Data": [
    {
      "AssetType": "FxSpot",
      "DisplayAndFormat": {
        "Currency": "AUD",
        "Decimals": 4,
        "Description": "British Pound/Australian Dollar",
        "Format": "AllowDecimalPips",
        "OrderDecimals": 4,
        "Symbol": "GBPAUD"
      },
      "HistoricalChanges": {
        "PercentChange1Month": 1.21,
        "PercentChange2Months": 2.95,
        "PercentChange3Months": 1.85,
        "PercentChange6Months": -1.83,
        "PercentChangeWeekly": 1.67
      },
      "InstrumentPriceDetails": {
        "IsMarketOpen": true,
        "ShortTradeDisabled": false,
        "ValueDate": "2017-05-19"
      },
      "LastUpdated": "0001-01-01T00:00:00Z",
      "PriceInfo": {
        "High": 1.09117,
        "Low": 1.08853,
        "NetChange": 0.00048,
        "PercentChange": 0.04
      },
      "PriceInfoDetails": {
        "AskSize": 1000000.0,
        "BidSize": 1000000.0,
        "LastClose": 1.08932,
        "LastTraded": 0.0,
        "LastTradedSize": 0.0,
        "Open": 0.0,
        "Volume": 0.0
      },
      "Quote": {
        "Amount": 100000,
        "Ask": 1.74948,
        "Bid": 1.74858,
        "DelayedByMinutes": 15,
        "ErrorCode": "None",
        "Mid": 1.74903,
        "PriceTypeAsk": "Indicative",
        "PriceTypeBid": "Indicative"
      },
      "Uic": 22
    },
    {
      "AssetType": "FxSpot",
      "DisplayAndFormat": {
        "Currency": "CAD",
        "Decimals": 4,
        "Description": "British Pound/Canadian Dollar",
        "Format": "AllowDecimalPips",
        "OrderDecimals": 4,
        "Symbol": "GBPCAD"
      },
      "InstrumentPriceDetails": {
        "IsMarketOpen": true,
        "ShortTradeDisabled": false,
        "ValueDate": "2017-05-19"
      },
      "LastUpdated": "0001-01-01T00:00:00Z",
      "Quote": {
        "Amount": 100000,
        "Ask": 1.76278,
        "Bid": 1.76198,
        "DelayedByMinutes": 15,
        "ErrorCode": "None",
        "Mid": 1.76238,
        "PriceTypeAsk": "Indicative",
        "PriceTypeBid": "Indicative"
      },
      "Uic": 23
    }
  ]
}
expected_status
response

response - get the response of the request.

status_code