Skip to content

v20.instrument.orderBook not implemented #29

Description

@dcolley

http://developer.oanda.com/rest-live-v20/instrument-ep/ refers an orderBook action, but this is not available in v20

api = v20.Context(
    hostname=config["hostname"],
    port=config["port"],
    token=config["token"],
    datetime_format=config["datetime_format"]
)
params = {
    "time": "2018-09-28T12:00:00:00Z"
}
response = api.instrument.orderBook(instrument, **params)
orderBook = response.get("orderBook", 200)
print(orderBook)

I get this error:

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-47-355910ca7359> in <module>()
      3     "time": "2018-09-28T12:00:00:00Z"
      4 }
----> 5 response = api.instrument.orderBook(instrument, **params)
      6 orderBook = response.get("orderBook", 200)
      7 print(orderBook)

AttributeError: 'EntitySpec' object has no attribute 'orderBook'

Is this a bug?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions