Purchase
Purchase levearge token
HTTP Request
POST /v5/spot-lever-token/purchase
Request Parameters
| Parameter | Required | Type | Comments |
|---|---|---|---|
| ltCoin | true | string | Abbreviation of the LT, such as BTC3L |
| ltAmount | true | string | Purchase amount |
| serialNo | false | string | Serial number |
Response Parameters
| Parameter | Type | Comments |
|---|---|---|
| ltCoin | string | Abbreviation of the LT, such as BTC3L |
| ltOrderStatus | string | Order status. 1: completed, 2: in progress, 3: failed |
| execQty | string | Executed qty of LT |
| execAmt | string | Executed amount of LT |
| amount | string | Purchase amount |
| purchaseId | string | Order ID |
| serialNo | string | Serial number, customised order ID |
| valueCoin | string | Quote coin |
Request Example
- HTTP
- Python
POST /v5/spot-lever-token/purchase HTTP/1.1
Host: api-testnet.bybit.com
X-BAPI-API-KEY: xxxxxxxxxxxxxxxxxx
X-BAPI-TIMESTAMP: 1672294730346
X-BAPI-SIGN: XXXXX
X-BAPI-RECV-WINDOW: 5000
Content-Type: application/json
{
"ltCoin": "EOS3L",
"amount": "200",
"serialNo": "purchase-001"
}
from pybit.unified_trading import HTTP
session = HTTP(
testnet=True,
api_key="xxxxxxxxxxxxxxxxxx",
api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
)
print(session.purchase_leveraged_token(
ltCoin="EOS3L",
amount="200",
serialNo="purchase-001",
))
Response Example
{
"retCode": 0,
"retMsg": "success",
"result": {
"amount": "200",
"execAmt": "",
"execQty": "",
"ltCoin": "EOS3L",
"ltOrderStatus": "2",
"purchaseId": "2611",
"serialNo": "purchase-001",
"valueCoin": "USDT"
},
"retExtInfo": {},
"time": 1672293867729
}