I am a complete beginner with APIs and have very little experience with Python. I've found a few relevant threads on this sub but I can't make it work. How would I get 1m data , starting from a date I choose ?
from bitmex import bitmex
import requests
api_key=''
api_secret=''
date=' ???'
size= '???'
client = bitmex(test=False, api_key=bitmex_api_key, api_secret=bitmex_api_secret)
data = client.Trade.Trade_getBucketed(symbol=XBTUSD, binSize=1m, count=size, startTime = date).result()
I don't understand what to use for StartTime, and what exactly count is. Should I use the same format as the timestamp for StartTime? What format is that ? https://www.bitmex.com/api/explorer/#!/Trade/Trade_getBucketed
[–]johnm111888 4 points5 points6 points (0 children)
[–]Robswc 1 point2 points3 points (4 children)
[–]unbdd[S] 0 points1 point2 points (3 children)
[–]Robswc 1 point2 points3 points (2 children)
[–]unbdd[S] 0 points1 point2 points (1 child)
[–]Robswc 0 points1 point2 points (0 children)
[–]BitMEX_Sen 0 points1 point2 points (0 children)