Public Endpoints

View as Markdown

Base URL

https://api.6mm.com

Service Version

GET /v1/version

Get service version information.

Server Time

GET /v1/time

Get server time. This endpoint can be used to calibrate client time before API Key signing.

User Login

POST /v1/public/user/login

Request parameters:

ParameterTypeRequiredDescription
usernamestringYesUsername, length 3 - 32
passwordstringYesPassword, length 1 - 64
deviceIdstringNoDevice fingerprint, up to 64 characters
deviceNamestringNoDevice name, up to 128 characters

Request example:

curl -X POST https://api.6mm.com/v1/public/user/login \
-H "Content-Type: application/json" \
-d '{
"username": "alice",
"password": "yourPassword",
"deviceId": "device-001",
"deviceName": "server-001"
}'

Response example:

{
"code": 0,
"message": "success",
"data": {
"accessToken": "YOUR_ACCESS_TOKEN",
"accessExpire": 1769676656
},
"requestId": "req-login"
}

Refresh Token

POST /v1/public/user/refresh-token

In normal integration scenarios, login state is refreshed via Cookie. Keep the Cookie returned by the login response.

Response fields:

FieldTypeDescription
accessTokenstringNew access Token
accessExpireint64Access Token expiry time

Agent SSO

Ticket Exchange

POST /v1/public/agent-sso/exchange-ticket

Request parameters:

ParameterTypeRequiredDescription
ticketstringYesOne-time ticket issued by the agent service
deviceIdstringNoDevice fingerprint, up to 64 characters

Response fields:

FieldTypeDescription
accessTokenstringAccess Token
accessExpireint64Access Token expiry time
redirectPathstringSuggested redirect path

Embed Token Exchange

POST /v1/public/agent-sso/exchange-embed-token

Request parameters:

ParameterTypeRequiredDescription
embedTokenstringYesShort-lived embedded trading token issued by the agent service
channelIdstringYesEmbedded iframe channel ID, up to 128 characters
deviceIdstringNoDevice fingerprint, up to 64 characters

Response fields:

FieldTypeDescription
accessTokenstringAccess Token
accessExpireint64Access Token expiry time

PnL Leaderboard

GET /v1/public/leaderboard/pnl?period=30d

Request parameters:

ParameterTypeRequiredDescription
periodstringYes7d / 30d / 90d

Response fields:

FieldTypeDescription
list[].rankint32Rank
list[].userIdstringExternal user ID
list[].traderstringMasked trader name
list[].volumestringTrading volume in the window
list[].pnlAmountstringRealized PnL in the window
list[].pnlPctstringPnL ratio, decimal from 0 to 1
myRankint32Current user’s rank. Returns 0 if unauthenticated or not ranked