binance / binance-connector-dotnet

Lightweight connector for integration with Binance API
MIT License
207 stars 69 forks source link

Documentation: How I can use the repo to get account snapshot for Spot Test Network. #28

Closed zydjohnHotmail closed 2 years ago

zydjohnHotmail commented 2 years ago

Description

Hello: I want to test some API functions in Spot Test Network, I created API key/Secret Key in Spot Test Network. I downloaded the repo, and modified the source code, so I changed base URL to pointo Spot Test Network base URL. I wrote some C# code to get Account Balance in Spot Test Network, but I don't like logging, so I created a Winforms App, the following is my C# code: Wallet wallet = new(new HttpClient(), apiKey: Binance_Test_API_Key1, apiSecret: Binance_Test_Secret_Key1); var result = await wallet.DailyAccountSnapshot(AccountType.SPOT); But I got 404 (NOT Found) error: So, I did some debugging, and I found the following HTTP GET request:

https://testnet.binance.vision/api/sapi/v1/accountSnapshot?type=SPOT&timestamp=1661633657884&signature=8615ce5b2f32cd97bf1525373c32babfb3eb809467652c5d746da3fd197086fe Its header is something like: X-MBX-APIKEY: My_Test_API_Key For me, the URL seems to be correct, but why I got 404 error. Please advise on what went wrong. Thanks,

2pd commented 2 years ago

Unfortunately /sapi/* endpoints are not supported on spot testnet. Only /api/* endpoints are available.