Skip to Content
Futures Cross

Withdraw from cross margin

Deprecated

POST/futures/cross/withdrawPrivate

Deprecated: /futures is being replaced by the /perp API; this route has no /perp equivalent yet. Move amount sats from the cross margin account back to your balance, up to the margin left after the initial margin (or the unrealized loss at the Mark price, if larger) and the maintenance margin. Returns the updated cross position.

Permissions: futures:cross:write

Request Body

application/json
  1. body
amount*integer

Amount to withdraw (in sats)

Range0 < value

Response Body

The updated cross position

application/json
  1. response
id*string

Position ID

Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid
updatedAt*string

Timestamp marking the last update of the position

Formatdate-time
margin*integer

Cross margin balance

quantity*number

Quantity of the position

leverage*integer

Leverage of the position

Range0 < value
entryPrice*|

Entry price

runningMargin*integer

Running margin

initialMargin*integer

Initial margin

maintenanceMargin*integer

Maintenance margin

liquidation*|

Liquidation price

tradingFees*integer

Trading fees

fundingFees*integer

Funding fees

totalPl*integer

Total profit/loss

deltaPl*integer

Delta profit/loss

import { createHttpClient } from '@ln-markets/sdk/rest/v3'

const client = createHttpClient({
  key: 'your-key',
  secret: 'your-secret',
  passphrase: 'your-passphrase',
})

const result = await client.futures.cross.withdraw({
  amount: 100000
})
{
  "id": "c0b9f9a0-4f6e-4a5a-8b7a-7f0f5f9a8a1e",
  "updatedAt": "2023-05-23T09:52:57.863Z",
  "margin": 100,
  "quantity": 100,
  "leverage": 10,
  "entryPrice": 100,
  "runningMargin": 100,
  "initialMargin": 100,
  "maintenanceMargin": 100,
  "liquidation": 100,
  "tradingFees": 100,
  "fundingFees": 100,
  "totalPl": 100,
  "deltaPl": 100
}