binance-us / binance-us-api-docs

Official Documentation for the Binance US APIs and Streams
410 stars 169 forks source link

/api/v3/myTrades returns empty list #47

Open vikrambajaj22 opened 3 years ago

vikrambajaj22 commented 3 years ago

I am trying to get a list of all my previous trades so I can compute my average buying price per symbol. I am able to use endpoints like /account, /ticker/price etc. with the API key and secret I generated. However, /api/v3/myTrades always returns an empty list regardless of the symbol I pass to it (I have tried 'BTCUSD', 'DOGEUSD', 'USDTUSD' etc.).

Am I missing something?

P.S.: I am calling these endpoints through python-binance since I found it easier to create the client using that package.

MaxPovver commented 3 years ago

@vikrambajaj22 did you add "fromId = 0" parameter to the request?

vikrambajaj22 commented 3 years ago

Yep, still empty

vikrambajaj22 commented 3 years ago

Any update on this? I tried using an API key/secret with spot trading enabled, but still see the same issue.

JoeDiesel40 commented 2 years ago

I seem to have similar issues except everything related to cryptic or coin values are threre just isn't showing my amount owned ..v2 8.5<33>

JoeDiesel40 commented 2 years ago

If that makes sense

vikrambajaj22 commented 2 years ago

I can get amount owned i.e. current value, but I get an empty list for my trades, so I can't access my purchase prices (to calculate P/L)

Sheikhharis50 commented 1 year ago

Is there any solution for this yet? I also have USDTUSD for buy and ONEUSD for sell coming from csv. But If I fetch it from API it's giving me an empty list.

Request

uri_path = "/api/v3/myTrades"
payload = {
    "symbol": "ONEUSD" or "USDTUSD",
    "limit": 1000,
    "timestamp": int(round(time.time() * 1000)),
    "recvWindow": "60000",
}

Response

[]