-
-
Notifications
You must be signed in to change notification settings - Fork 167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sos GET OPEN ORDERS #23
Comments
If you use this repo:
To get the public order book for a market: import poloniex
polo = poloniex.Poloniex()
orders = polo.marketOrders(pair='BTC_CGA', depth=10)
print(orders)
#or
orders = polo.api('returnOrderBook', { 'currencyPair': 'BTC_CGA', 'depth': '10' } )
print(orders) To get your personal order book: import poloniex
polo = poloniex.Poloniex('YOUR-TRADE-API-KEY-HERE', 'YourApiSecretKeyGoesHere')
orders = polo.myOrders(pair='all')
print(orders)
#or
orders = polo.api('returnOpenOrders', {'currencyPair': 'all'})
print(orders) |
Everything you are trying to write code for has already been done for you. You just need to install and use an api wrapper (like this repo!). |
ok i will do it is better dont reinvent the wheeil |
This function is probably what you are looking for. It identifies the command as public or private, then encodes the command as a url and posts the request. If the command is "private" then the function will sign the headers and send the request with the encoded url and signed headers. It is all wrapped in a class called |
now everthing works good i really suggest to use this library |
Hello i am a young developer this is my first time with the api of poloniex, I am developing a python bot for Poloniex , but is all the day that i try to make a request to get the open order but it fails!!
My code is very similar to your but I dont know, why it dosent works the request status is 200 but this is the reply:
{'error': 'Invalid command.'}
this is my code:
`# Returns open orders for a given market
could you help me to fix??
i hope to receive your answear and sorry again`
The text was updated successfully, but these errors were encountered: