v20.instrument.orderBook not implemented
See original GitHub issuehttp://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?
Issue Analytics
- State:
- Created 5 years ago
- Comments:12
Top Results From Across the Web
Release Notes - Oanda API
Version Date Details
3.0.22 April 11, 2018 Various documentation and example improvements
3.0.20 September 26, 2017 Added toString() methods to Java classes
3.0.19 September 12, 2017...
Read more >OANDA REST-V20 API Documentation - Read the Docs
The oandapyV20 package offers an API to the OANDA V20 REST service. ... ENDPOINT = 'v3/instruments/{instrument}/orderBook'.
Read more >Oanda Plugin - Zorro Project
More commands, f.i. for retrieving order book data, can be implemented on user ... The Oanda V20 API does not return rollover rates,...
Read more >Deribit API
Deribit tradeable assets or instruments use the following system of naming: ... Note that subscriptions and cancel on disconnect are not supported via...
Read more >FIX for GENIUM INET for NASDAQ OMX - Borsa İstanbul
User Notification (Currently not supported). ... NOTE: Genium INET OrderIDs are only unique per orderbook and Side.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
scroll!
https://github.com/oanda/v20-python/blob/master/src/v20/instrument.py#L1038
It looks like the enpoint that is used to fetch the orderbooks wasn’t set up correctly to have an API call auto-generated for it. I’ll get that added and published shortly. The API call will indeed be “api.instrument.orderBook()” as you had predicted.