Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- api ref:
- Fills
- List Fills
- [
- {
- "trade_id": 74,
- "product_id": "BTC-USD",
- "price": "10.00",
- "size": "0.01",
- "order_id": "d50ec984-77a8-460a-b958-66f114b0de9b",
- "created_at": "2014-11-07T22:19:28.578544Z",
- "liquidity": "T",
- "fee": "0.00025",
- "settled": true,
- "side": "buy"
- }
- ]
- q = auth_client.get_fills(product_id="ETC-USD")
- x_bid = (q[0][0]['side'])
- last_buy = float(q[0][0]['price'])
- profit = last_buy + 0.010
- x_last_buy = last_buy
- print(last_buy,"the last buy price")
- print(profit, "profit")
- if x_bid == 'buy':
- print ("bought at", last_buy)
- code:
- I tried putting side = buy that dind't work, I tried an If statement, but it uses the key and only gives me the last order weather it's buy or sell.
- Traceback (most recent call last):
- File "newmaker22.py", line 73, in <module>
- q = auth_client.get_fills(product_id="ETC-USD",side="buy")
- TypeError: get_fills() got an unexpected keyword argument 'side'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement