Skip to content

Cash-in

POST
/v2/futures/cash-in

Cash-in (i.e. “remove money”) from a trade. Funds are first removed from the trade’s PL (if any), then from the trade’s margin. Note that cashing-in increases the trade’s leverage ; the whole margin hence isn’t available since leverage is bounded.

Request Body

Body

object
id
required
string format: uuid
amount
required
number
> 0
{
"id": "d0b9f9a0-4f6e-4a5a-8b7a-7f0f5f9a8a1e",
"amount": 100
}

Responses

200

200

object
id
required
string format: uuid
uid
required
string format: uuid
type
required
string
Allowed values: m l
side
required
string
Allowed values: b s
opening_fee
required
integer
>= -9007199254740991 <= 9007199254740991
closing_fee
required
integer
>= -9007199254740991 <= 9007199254740991
maintenance_margin
required
integer
>= -9007199254740991 <= 9007199254740991
quantity
nullable
margin
required
integer
>= -9007199254740991 <= 9007199254740991
leverage
nullable
price
nullable
liquidation
nullable
stoploss
nullable
takeprofit
nullable
exit_price
nullable
pl
required
integer
>= -9007199254740991 <= 9007199254740991
creation_ts
nullable
market_filled_ts
required
number
closed_ts
required
string format: null
nullable
open
required
boolean
running
required
boolean
canceled
required
boolean
closed
required
boolean
last_update_ts
nullable
sum_carry_fees
nullable
entry_price
nullable
entry_margin
required
integer
nullable >= -9007199254740991 <= 9007199254740991
{
"uid": "821f4a4d-5fad-4cdb-ac89-60d4a1a9795b",
"type": "m",
"id": "d0b9f9a0-4f6e-4a5a-8b7a-7f0f5f9a8a1e",
"side": "b",
"opening_fee": 10,
"closing_fee": 0,
"maintenance_margin": 0,
"quantity": 100,
"margin": 900,
"leverage": 10,
"price": 20000,
"liquidation": 18000,
"pl": 0,
"creation_ts": 1629782400000,
"market_filled_ts": 1629782400000,
"open": false,
"running": true,
"canceled": false,
"closed": false,
"last_update_ts": 1629782400000,
"sum_carry_fees": 0
}

400

400