Skip to main content
POST
/
2
/
perp
/
payloads
/
create-account
Build create-account payload
curl --request POST \
  --url https://demo-api.mobula.io/api/2/perp/payloads/create-account \
  --header 'Content-Type: application/json' \
  --data '
{
  "timestamp": 123,
  "signature": "<string>",
  "dex": "gains",
  "chainId": "<string>",
  "accountIndex": 123,
  "apiKeyIndex": 123
}
'
{
  "success": true,
  "data": {
    "action": "<string>",
    "dex": "<string>",
    "chainId": "<string>",
    "transport": "offchain-api",
    "payloadStr": "<string>",
    "marketId": "<string>"
  }
}

Body

application/json
timestamp
number
required

Unix ms timestamp; must be within 30s of server time.

signature
string
required

Hex signature of {endpoint}-{timestamp}. Recovered signer becomes the request user.

dex
enum<string>
required
Available options:
gains,
lighter
chainId
string
required
accountIndex
number
apiKeyIndex
number

Response

200 - application/json

Canonical payload envelope

success
boolean
required
data
object
required