mexcdevelop / mexc-api-demo Goto Github PK
View Code? Open in Web Editor NEWapi-demo
api-demo
hello and thanks for your project , can i ask you to add transfer function to V3 API?
it is a must one in order to trade isolated .
thank you much !
to subscribe to a single symbol, you need to make a request like:
webSocket.send("{\"op\":\"sub.symbol\",\"symbol\":\"BTC_USDT\"}");
but I need to subscribe to a list of symbols, how to do it?
when i create a listen key ;
i extend it every 10 second ; and return 730708 error code .
what happen and how do i fix it ?
Map<String, String> params = Map.of("listenKey", listenKey, "recvWindow", "60000");
timer.schedule(new TimerTask() {
@Override
public void run() {
Map<String, String> refreshResultMap = UserDataClient.put("/api/v3/userDataStream", params, new TypeReference<>() {});
logger.info("extend listenKey for mexc , return result : {}", JSONObject.toJSONString(refreshResultMap));
}
}, 10 * 1000, 10 * 1000);
{"code":"730708","msg":"listen key information error"}
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
config/config.go
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.
mexc-api-demo/go/utils/utils.go
Line 54 in 83f5b76
message := fmt.Sprintf("%stimestamp=%d", strParams, timestamp)
This fix works for GET /api/v3/account
, but further testing needed for other endpoints.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.