Trading
Last updated
Last updated
GET
https://api.liquid.com/trades?product_id={product_id}&funding_currency={funding_currency}
Get trades by applying optional filters.
Name | Type | Description |
---|---|---|
GET
https://api.liquid.com/users/leverage_limitation
Get an account's available choices in leverage.
PUT
https://api.liquid.com/trades/{trade_id}/close
Close a live position (live trade) by specifying the trade ID and quantity.
PUT
https://api.liquid.com/trades/{trade_id}/claim
Claim a trade by specifying its ID. This works only for Margin pairs where the funding currency is similar to the quote currency i.e. trade BTCUSD with USD.
PUT
https://api.liquid.com/trades/close_all
Closes live positions (live trades).
PUT
https://api.liquid.com/trades/{trade_id}
Provide either only the stop loss price, only the take profit price, or both.
PUT
https://api.liquid.com/trades/{trade_id}/adjust_margin
For isolated margin trades only. Adjust a trade's allocated margin a.k.a. margin used.
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
product_id
string
Product ID 1
for BTCUSD.
funding_currency
string
Filter by example: USD
.
status
string
Filter by open
or closed
.
side
string
Filter by long
or short
.
trading_type
string
Filter by spot
, margin
, cfd
, perpetual
.
trade_id
string
Example Trade ID:60223738
.
closed_quantity
string
Partially close 0.00056 quantities with{"closed_quantity": "0.00056"}
. If you do not specify this then the full position will be closed.
trade_id
string
Example of trade ID: 57896
side
string
{"side": "long}
to close all long positions {"side": "short"}
to close all short positions.
If this is not specified then all positions, both on the long side and the short side will be closed.
trade_id
string
Example trade ID:60223740
.
stop_loss
string
Update stop loss with{"stop_loss": "7000"}
take_profit
string
Update take profit with{"take_profit": "8000"}
trade_id
string
Example trade ID:60223741
amount
string
{"amount": "100"}
to increase the allocated margin by 100 i.e. current 250 allocated margin becomes 250+100=350