Skip to main content
POST
/
api
/
v1
/
user
/
intent
/
commit
Send intent and wait for commitment
curl --request POST \
  --url https://api.ekiden.fi/api/v1/user/intent/commit \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "nonce": 0,
  "payload": {
    "orders": [
      {
        "bracket": null,
        "is_cross": true,
        "leverage": 1,
        "market_addr": "<string>",
        "order_link_id": "<string>",
        "price": 1,
        "reduce_only": true,
        "side": "<string>",
        "size": 1,
        "time_in_force": null,
        "trigger_price": 50000000000,
        "type": "<string>"
      }
    ],
    "type": "order_create"
  },
  "signature": "0x3c0fc5e16a720127bbd3a3b017363a419c41bed70190a2d016e71a9ab5091eb4c558660c4695701bb7a531c86ce0d06301d286e983b6d9b7e0277a87b1512301"
}'
{
  "error_message": "<string>",
  "output": {
    "outputs": [
      {
        "sid": "<string>"
      }
    ],
    "type": "order_create"
  },
  "seq": 1,
  "sid": "<string>",
  "status": 1,
  "timestamp": 1,
  "version": 1
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
nonce
integer
default:0
required
Required range: x >= 0
payload
object
required

Intent payload variants include:

  • order_create
  • order_cancel
  • order_cancel_all
  • leverage_assign

For order_create entries:

  • Types: type = "market" | "limit"
  • Time-in-Force: GTC | IOC | FOK | PostOnly (rejected if it would take liquidity)
  • Conditional via trigger_price:
    • Stop-Market: type = "market"
    • Stop-Limit: type = "limit" + price
  • Optional TP/SL bracket (bracket):
    • Legs: take_profit, stop_loss
    • order_type = MARKET | LIMIT (LIMIT requires limit_price)
    • Legs are reduce-only with IOC semantics
  • Option 1
  • Option 2
  • Option 3
  • Option 4
signature
string
required
Example:

"0x3c0fc5e16a720127bbd3a3b017363a419c41bed70190a2d016e71a9ab5091eb4c558660c4695701bb7a531c86ce0d06301d286e983b6d9b7e0277a87b1512301"

Response

Intent committed

output
object
required
  • Option 1
  • Option 2
  • Option 3
  • Option 4
sid
string
required
status
integer
required

ActionStatus: 0 = Pending, 1 = Success, 2 = Rejected.

Required range: x >= 0
Example:

1

error_message
string | null

Error message present when status = 2 (Rejected).

seq
integer | null
Required range: x >= 0
timestamp
integer | null
Required range: x >= 0
version
integer | null
Required range: x >= 0