Author

Topic: python poloniex API to see my last trades (Read 980 times)

sr. member
Activity: 322
Merit: 250
Spray and Pray
April 10, 2017, 03:22:35 PM
#2
Code:
pip install git+https://github.com/s4w3d0ff/python-polonix.git --user
Seems to be working for me. returnTradeHistory should return your trade history, while marketTradeHist will return everyones trades for the market
Code:
from poloniex import Poloniex
polo = Poloniex('api-key-here', 'supersecrethashhere123')
# your trades
polo.returnTradeHistory()
Quote
{u'BTC_VTC': [{u'category': u'exchange', u'fee': u'0.00150000', u'tradeID': u'446971', u'orderNumber': u'5138465491', u'amount': u'1109.44444445', u'rate': u'0.00017200', u'date': u'2017-04-10 09:41:31', u'total': u'0.19082444', u'type': u'sell', u'globalTradeID': u'103263644'}, {u'category': u'exchange', u'fee': u'0.00150000', u'tradeID': u'429065', u'orderNumber': u'5067638389', u'amount': u'1111.11111111', u'rate': u'0.00009000', u'date': u'2017-04-10 04:49:27', u'total': u'0.09999999', u'type': u'buy', u'globalTradeID': u'103163970'}, {u'category': u'exchange', u'fee': u'0.00150000', u'tradeID': u'428121', u'orderNumber': u'5016845233', u'amount': u'2283.95409345', u'rate': u'0.00011000', u'date': u'2017-04-10 04:32:59', u'total': u'0.25123495', u'type': u'sell', u'globalTradeID': u'103159723'}]}
Code:
# market trades
polo.marketTradeHist('BTC_VTC')
Quote
[{u'tradeID': u'481386', u'amount': u'21.88995030', u'rate': u'0.00015493', u'date': u'2017-04-10 20:11:23', u'total': u'0.00339140', u'type': u'buy', u'globalTradeID': u'103517907'},,,,]
hero member
Activity: 865
Merit: 1006
Hello
I am creating a program in python to consult the api of poloniex.
I have already been able to identify myself correctly, check ticket, but I can not find the way to know my last trades.
The "returnTradeHistory" command returns the last trades of the entire platform, but I want to see only mine.

I use the library of:

https://github.com/s4w3d0ff/python-poloniex

Any suggestion?

Thank you very much...
Jump to: