Bitcoin Forum
August 20, 2018, 04:50:56 PM *
News: Latest stable version of Bitcoin Core: 0.16.2  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: python poloniex API to see my last trades  (Read 928 times)
xcbtrader
Hero Member
*****
Offline Offline

Activity: 867
Merit: 1006


View Profile
April 01, 2017, 06:14:00 PM
 #1

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...

Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1534783856
Hero Member
*
Offline Offline

Posts: 1534783856

View Profile Personal Message (Offline)

Ignore
1534783856
Reply with quote  #2

1534783856
Report to moderator
s4w3d0ff
Sr. Member
****
Offline Offline

Activity: 322
Merit: 250


Spray and Pray


View Profile
April 10, 2017, 08: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'},,,,]

BTC:15D8VaZco22GTLVrFMAehXyif6EGf8GMYV
|⚒|Cryptographic Anomaly|⚒|
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!