Description
I've needed to test signature generation for GET /api/v3/account endpoint. Running mexc-api-demo/go/run demo/Spot Trade results in an error: {"code":700002,"msg":"Signature for this request is not valid."}
Steps to Reproduce
- Set up API keys in
config/config.go
- Make request:
go run /run demo/Spot Trade/SpotAccountInfo.go
Actual behavior
Response is: {"code":700002,"msg":"Signature for this request is not valid."}
Expected behavior
Response is {"makerCommission":null, ..., "permissions":["SPOT"]}
Additional context
I've resolved the error for this endpoint.
|
message := fmt.Sprintf("%s×tamp=%d", strParams, timestamp) |
Changing to this resolved an error:
message := fmt.Sprintf("%stimestamp=%d", strParams, timestamp)
This fix works for GET /api/v3/account, but further testing needed for other endpoints.
Description
I've needed to test signature generation for
GET /api/v3/accountendpoint. Runningmexc-api-demo/go/run demo/Spot Traderesults in an error:{"code":700002,"msg":"Signature for this request is not valid."}Steps to Reproduce
config/config.gogo run /run demo/Spot Trade/SpotAccountInfo.goActual behavior
Response is:
{"code":700002,"msg":"Signature for this request is not valid."}Expected behavior
Response is
{"makerCommission":null, ..., "permissions":["SPOT"]}Additional context
I've resolved the error for this endpoint.
mexc-api-demo/go/utils/utils.go
Line 54 in 83f5b76
Changing to this resolved an error:
This fix works for
GET /api/v3/account, but further testing needed for other endpoints.