You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can use make use of oandapyV20 instead, it supports that. You can use v20 and oandapyV20 parallel, so for a quick hack you use only oandapyV20 for the orderbook info.
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.
@dmpettyp the code is littered with camelCase... hence I was following that convention. I have a PR that solves the problem for me - should I submit it?
Hmm, while there is camel case in the code, I believe that it mostly is used to access data from the JSON responses, which is all camel case. I think that most of the python variables and function names use snake case.
Thanks for the PR, however all of the code in the library is auto-generated and we're not set-up to merge code into the library. You should be able to find the order_book() call is in the latest build.
The percentage of standing orders to sell and buy (respectively) at price points within the corresponding price bucket. The bucket’s lower bound is the price given and its upper bound is the price plus the bucket width, not inclusive, if I recall correctly.On Jan 22, 2023, at 1:16 PM, Santiago Ruiz Zuluaga ***@***.***> wrote:
Can someone explain to me please, what does shortCountPercent and longCountPercent mean? how can I interpret this information?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
Activity
hootnot commentedon Sep 28, 2018
I don't use this lib,, but sources contain OrderBook, so does it fail with a capital 'O' also ?
dcolley commentedon Sep 28, 2018
I tried that. OrderBook exists, but does not work as the REST API is documented.
hootnot commentedon Sep 28, 2018
You can use make use of oandapyV20 instead, it supports that. You can use v20 and oandapyV20 parallel, so for a quick hack you use only oandapyV20 for the orderbook info.
dcolley commentedon Sep 28, 2018
from command line:
returns:
{"orderBook":{ "instrument":"USD_JPY","time":"2018-09-28T12:40:00Z","unixTime":"1538138400","price":"113.437","bucketWidth":"0.050", "buckets":[ {"price":"0.000","longCountPercent":"0.0071","shortCountPercent":"0.0000"}, {"price":"0.100","longCountPercent":"0.0214","shortCountPercent":"0.0214"}, {"price":"0.150","longCountPercent":"0.0071","shortCountPercent":"0.0285"}, {"price":"0.200","longCountPercent":"0.0000","shortCountPercent":"0.0071"}, {"price":"0.300","longCountPercent":"0.0000","shortCountPercent":"0.0142"}, {"price":"0.400","longCountPercent":"0.0000","shortCountPercent":"0.0071"}, {"price":"0.500","longCountPercent":"0.0071","shortCountPercent":"0.0071"}, {"price":"0.600","longCountPercent":"0.0000","shortCountPercent":"0.0071"}, {"price":"0.700","longCountPercent":"0.0214","shortCountPercent":"0.0071"}, {"price":"0.800","longCountPercent":"0.0000","shortCountPercent":"0.0071"}, {"price":"0.850","longCountPercent":"0.0000","shortCountPercent":"0.0071"}, {"price":"0.900","longCountPercent":"0.0000","shortCountPercent":"0.0142"}, {"price":"0.950","longCountPercent":"0.0000","shortCountPercent":"0.0071"}, {"price":"1.000","longCountPercent":"0.1638","shortCountPercent":"0.0783"}, {"price":"1.050","longCountPercent":"0.0000","shortCountPercent":"0.0071"}, {"price":"1.100","longCountPercent":"0.0071","shortCountPercent":"0.0142"}, {"price":"1.150","longCountPercent":"0.0071","shortCountPercent":"0.0000"}, {"price":"1.200","longCountPercent":"0.0142","shortCountPercent":"0.0071"}, {"price":"1.300","longCountPercent":"0.0000","shortCountPercent":"0.0071"}, {"price":"1.400","longCountPercent":"0.0000","shortCountPercent":"0.0071"}, {"price":"1.500","longCountPercent":"0.0000","shortCountPercent":"0.0071"}, {"price":"1.600","longCountPercent":"0.0000","shortCountPercent":"0.0071"}, {"price":"1.700","longCountPercent":"0.0000","shortCountPercent":"0.0071"}, {"price":"1.750","longCountPercent":"0.0142","shortCountPercent":"0.0000"}, {"price":"1.800","longCountPercent":"0.0000","shortCountPercent":"0.0071"}, {"price":"1.900","longCountPercent":"0.0000","shortCountPercent":"0.0071"}, {"price":"2.000","longCountPercent":"0.0000","shortCountPercent":"0.0214"}, {"price":"2.100","longCountPercent":"0.0000","shortCountPercent":"0.0071"}, {"price":"2.200","longCountPercent":"0.0000","shortCountPercent":"0.0071"}, {"price":"2.300","longCountPercent":"0.0000","shortCountPercent":"0.0071"}, {"price":"2.400","longCountPercent":"0.0000","shortCountPercent":"0.0071"}, {"price":"2.500","longCountPercent":"0.0000","shortCountPercent":"0.0071"}, {"price":"2.600","longCountPercent":"0.0000","shortCountPercent":"0.0071"}, {"price":"2.700","longCountPercent":"0.0000","shortCountPercent":"0.0071"}, {"price":"2.800","longCountPercent":"0.0000","shortCountPercent":"0.0071"}, {"price":"2.900","longCountPercent":"0.0000","shortCountPercent":"0.0071"}, {"price":"3.000","longCountPercent":"0.0000","shortCountPercent":"0.0142"}, {"price":"3.100","longCountPercent":"0.0000","shortCountPercent":"0.0071"}, {"price":"3.200","longCountPercent":"0.0000","shortCountPercent":"0.0071"}, {"price":"3.300","longCountPercent":"0.0000","shortCountPercent":"0.0071"}, {"price":"3.400","longCountPercent":"0.0000","shortCountPercent":"0.0071"}, {"price":"3.500","longCountPercent":"0.0000","shortCountPercent":"0.0071"}, {"price":"3.600","longCountPercent":"0.0000","shortCountPercent":"0.0071"}, {"price":"3.700","longCountPercent":"0.0000","shortCountPercent":"0.0071"}, {"price":"3.800","longCountPercent":"0.0000","shortCountPercent":"0.0071"}, {"price":"3.900","longCountPercent":"0.0000","shortCountPercent":"0.0071"}, {"price":"4.000","longCountPercent":"0.0000","shortCountPercent":"0.0071"}, {"price":"4.100","longCountPercent":"0.0000","shortCountPercent":"0.0071"}, {"price":"4.200","longCountPercent":"0.0000","shortCountPercent":"0.0071"}, {"price":"4.300","longCountPercent":"0.0000","shortCountPercent":"0.0071"} }```dmpettyp commentedon Sep 28, 2018
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.
dmpettyp commentedon Sep 28, 2018
actually, since it's python, the API call will be order_book()
dcolley commentedon Sep 28, 2018
@dmpettyp the code is littered with camelCase... hence I was following that convention. I have a PR that solves the problem for me - should I submit it?
dcolley commentedon Sep 28, 2018
PR #30 created
dmpettyp commentedon Sep 28, 2018
Hmm, while there is camel case in the code, I believe that it mostly is used to access data from the JSON responses, which is all camel case. I think that most of the python variables and function names use snake case.
Thanks for the PR, however all of the code in the library is auto-generated and we're not set-up to merge code into the library. You should be able to find the order_book() call is in the latest build.
https://github.com/oanda/v20-python/blob/master/src/v20/instrument.py#L932
dcolley commentedon Sep 28, 2018
Sweet! 👍
dcolley commentedon Sep 28, 2018
PS: you should also do this for position_book()
dmpettyp commentedon Sep 28, 2018
scroll!
https://github.com/oanda/v20-python/blob/master/src/v20/instrument.py#L1038
asasa293 commentedon Jan 22, 2023
Can someone explain to me please, what does shortCountPercent and longCountPercent mean? how can I interpret this information?
cadwallader commentedon Jan 22, 2023