How to get transfer from P2P to Spot and vice-versa

Hello World!

I’m working on a “Balance Analyzer tool” and I would like to learn and collect all needed endpoints to do so. At the moment, I’m stuck getting all data related to transfer between P2P and Spot, I found this endpoint GET /sapi/v1/asset/transfer (HMAC SHA256) but this is not returning all expected results. (I have done more than 10 transfers) and I’m getting only the last transfer that I made.

For each interval of time, I’m getting:

{‘total’: 0}

and I’m sure I have done transfer within those intervals.

I’m using these values for the endpoint

/sapi/v1/asset/transfer?startTime=1630119600000&endTime=1635035142606&type=MAIN_FUNDING&type=FUNDING_MAIN&timestamp=1635035145910&signature=…

am I missing something??? (hopefully I am)

thanks in advance for the help!

why are there 2 type parameter in your query string? Try removing one and try again.

Hi @Chai!

in theory, I need both:
MAIN_FUNDING (Spot to Funding)
FUNDING_MAIN (Funding to Spot)

I first tried one “type” at the time, but I didn’t get the expected result either :frowning_face:

P2P wallet is merged into the funding wallet from 2021-09-09 (UTC). Therefore if you are trying to look at transfer record before that into the P2P wallet, you will not see it.

Interesting!!! thanks for your comment!! by any chance do you know what endpoint I should use to get transfer from/to P2P???

There isn’t any endpoint for that unfortunately.

nooooooooooooooooo :frowning_face: you have made a grown-up man cry! :sob: