Spreads¶
-
class
oandapyV20.endpoints.forexlabs.
Spreads
(params)¶ Bases:
oandapyV20.endpoints.forexlabs.ForexLabs
Spreads.
Get the spread information for an instrument.
-
ENDPOINT
= 'labs/v1/spreads'¶
-
EXPECTED_STATUS
= 200¶
-
METHOD
= 'GET'¶
-
__init__
(params)¶ Instantiate a Spreads request.
Parameters: params (dict (required)) – query params to send, check developer.oanda.com for details. >>> import oandapyV20 >>> import oandapyV20.endpoints.forexlabs as labs >>> accountID = ... >>> client = oandapyV20.API(access_token=...) >>> params = { "instrument": "EUR_USD", "period": 57600 }
>>> r = labs.Spreads(params=params) >>> client.request(r) >>> print(r.response)
Output:
{ "max": [ [ 1520028000, 6 ] ], "avg": [ [ 1520028000, 3.01822 ] ], "min": [ [ 1520028000, 1.7 ] ] }
-