-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
lighter
Kind: global class
Extends: Exchange
- preLoadLighterLibrary
- createOrder
- editOrder
- fetchStatus
- fetchTime
- fetchMarkets
- fetchCurrencies
- fetchOrderBook
- fetchTicker
- fetchTickers
- fetchOHLCV
- fetchFundingRates
- fetchPosition
- fetchPositions
- fetchAccounts
- fetchOpenOrders
- fetchClosedOrders
- transfer
- fetchTransfers
- fetchDeposits
- fetchWithdrawals
- withdraw
- fetchMyTrades
- setLeverage
- setMarginMode
- cancelOrder
- cancelAllOrders
- cancelAllOrdersAfter
- addMargin
- reduceMargin
- setMargin
- watchOrderBook
- unWatchOrderBook
- watchTicker
- unWatchTicker
- watchTickers
- unWatchTickers
- watchMarkPrice
- watchMarkPrices
- unWatchMarkPrice
- unWatchMarkPrices
- watchTrades
- unWatchTrades
- watchMyTrades
- unWatchMyTrades
- watchLiquidations
- watchBalance
- unWatchOrders
if the required credentials are available in options, it will pre-load the lighter Signer to avoid delaying sensitive calls like createOrder the first time they're executed
Kind: instance method of lighter
Returns: boolean - true if the signer was loaded, false otherwise
| Param |
|---|
| params |
lighter.preLoadLighterLibrary (params, [undefined])create a trade order
Kind: instance method of lighter
Returns: object - an order structure
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to create an order in |
| type | string |
Yes | 'market' or 'limit' |
| side | string |
Yes | 'buy' or 'sell' |
| amount | float |
Yes | how much of currency you want to trade in units of base currency |
| price | float |
No | the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.timeInForce | string |
No | 'GTT' or 'IOC', default is 'GTT' |
| params.clientOrderId | int |
No | client order id, should be unique for each order, default is a random number |
| params.triggerPrice | string |
No | trigger price for stop loss or take profit orders, in units of the quote currency |
| params.reduceOnly | boolean |
No | whether the order is reduce only, default false |
| params.nonce | int |
No | nonce for the account |
| params.apiKeyIndex | int |
No | apiKeyIndex |
| params.accountIndex | int |
No | accountIndex |
| params.orderExpiry | int |
No | orderExpiry |
lighter.createOrder (symbol, type, side, amount[, price, params])cancels an order and places a new order
Kind: instance method of lighter
Returns: object - an order structure
| Param | Type | Required | Description |
|---|---|---|---|
| id | string |
Yes | order id |
| symbol | string |
Yes | unified symbol of the market to create an order in |
| type | string |
Yes | 'market' or 'limit' |
| side | string |
Yes | 'buy' or 'sell' |
| amount | float |
Yes | how much of the currency you want to trade in units of the base currency |
| price | float |
No | the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.accountIndex | string |
No | account index |
| params.apiKeyIndex | string |
No | api key index |
lighter.editOrder (id, symbol, type, side, amount[, price, params])the latest known information on the availability of the exchange API
Kind: instance method of lighter
Returns: object - a status structure
See: https://apidocs.lighter.xyz/reference/status
| Param | Type | Required | Description |
|---|---|---|---|
| params | object |
No | extra parameters specific to the exchange API endpoint |
lighter.fetchStatus ([params])fetches the current integer timestamp in milliseconds from the exchange server
Kind: instance method of lighter
Returns: int - the current integer timestamp in milliseconds from the exchange server
See: https://apidocs.lighter.xyz/reference/status
| Param | Type | Required | Description |
|---|---|---|---|
| params | object |
No | extra parameters specific to the exchange API endpoint |
lighter.fetchTime ([params])retrieves data on all markets for lighter
Kind: instance method of lighter
Returns: Array<object> - an array of objects representing market data
See: https://apidocs.lighter.xyz/reference/orderbookdetails
| Param | Type | Required | Description |
|---|---|---|---|
| params | object |
No | extra parameters specific to the exchange API endpoint |
lighter.fetchMarkets ([params])fetches all available currencies on an exchange
Kind: instance method of lighter
Returns: object - an associative dictionary of currencies
See: https://apidocs.lighter.xyz/reference/assetdetails
| Param | Type | Required | Description |
|---|---|---|---|
| params | object |
No | extra parameters specific to the exchange API endpoint |
lighter.fetchCurrencies ([params])fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
Kind: instance method of lighter
Returns: object - A dictionary of order book structures indexed by market symbols
See: https://apidocs.lighter.xyz/reference/orderbookorders
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to fetch the order book for |
| limit | int |
No | the maximum amount of order book entries to return |
| params | object |
No | extra parameters specific to the exchange API endpoint |
lighter.fetchOrderBook (symbol[, limit, params])fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
Kind: instance method of lighter
Returns: object - a ticker structure
See: https://apidocs.lighter.xyz/reference/orderbookdetails
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to fetch the ticker for |
| params | object |
No | extra parameters specific to the exchange API endpoint |
lighter.fetchTicker (symbol[, params])fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
Kind: instance method of lighter
Returns: object - a dictionary of ticker structures
See: https://apidocs.lighter.xyz/reference/orderbookdetails
| Param | Type | Required | Description |
|---|---|---|---|
| symbols |
Array<string>, undefined
|
Yes | unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned |
| params | object |
No | extra parameters specific to the exchange API endpoint |
lighter.fetchTickers (symbols[, params])fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
Kind: instance method of lighter
Returns: Array<Array<int>> - A list of candles ordered as timestamp, open, high, low, close, volume
See: https://apidocs.lighter.xyz/reference/candles
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to fetch OHLCV data for |
| timeframe | string |
Yes | the length of time each candle represents |
| since | int |
No | timestamp in ms of the earliest candle to fetch |
| limit | int |
No | the maximum amount of candles to fetch |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.until | int |
No | timestamp in ms of the latest candle to fetch |
lighter.fetchOHLCV (symbol, timeframe[, since, limit, params])fetch the current funding rate for multiple symbols
Kind: instance method of lighter
Returns: Array<object> - a list of funding rate structures
See: https://apidocs.lighter.xyz/reference/funding-rates
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> |
No | list of unified market symbols |
| params | object |
No | extra parameters specific to the exchange API endpoint |
lighter.fetchFundingRates ([symbols, params])fetch data on an open position
Kind: instance method of lighter
Returns: object - a position structure
See: https://apidocs.lighter.xyz/reference/account-1
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified market symbol of the market the position is held in |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.by | string |
No | fetch balance by 'index' or 'l1_address', defaults to 'index' |
| params.value | string |
No | fetch balance value, account index or l1 address |
lighter.fetchPosition (symbol[, params])fetch all open positions
Kind: instance method of lighter
Returns: Array<object> - a list of position structure
See: https://apidocs.lighter.xyz/reference/account-1
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> |
No | list of unified market symbols |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.by | string |
No | fetch balance by 'index' or 'l1_address', defaults to 'index' |
| params.value | string |
No | fetch balance value, account index or l1 address |
lighter.fetchPositions ([symbols, params])fetch all the accounts associated with a profile
Kind: instance method of lighter
Returns: object - a dictionary of account structures indexed by the account type
See: https://apidocs.lighter.xyz/reference/account-1
| Param | Type | Required | Description |
|---|---|---|---|
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.by | string |
No | fetch balance by 'index' or 'l1_address', defaults to 'index' |
| params.value | string |
No | fetch balance value, account index or l1 address |
lighter.fetchAccounts ([params])fetch all unfilled currently open orders
Kind: instance method of lighter
Returns: Array<Order> - a list of order structures
See: https://apidocs.lighter.xyz/reference/accountactiveorders
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified market symbol |
| since | int |
No | the earliest time in ms to fetch open orders for |
| limit | int |
No | the maximum number of open orders structures to retrieve |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.accountIndex | string |
No | account index |
lighter.fetchOpenOrders (symbol[, since, limit, params])fetch all unfilled currently closed orders
Kind: instance method of lighter
Returns: Array<Order> - a list of order structures
See: https://apidocs.lighter.xyz/reference/accountinactiveorders
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified market symbol |
| since | int |
No | the earliest time in ms to fetch open orders for |
| limit | int |
No | the maximum number of open orders structures to retrieve |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.accountIndex | string |
No | account index |
lighter.fetchClosedOrders (symbol[, since, limit, params])transfer currency internally between wallets on the same account
Kind: instance method of lighter
Returns: object - a transfer structure
| Param | Type | Required | Description |
|---|---|---|---|
| code | string |
Yes | unified currency code |
| amount | float |
Yes | amount to transfer |
| fromAccount | string |
Yes | account to transfer from (spot, perp) |
| toAccount | string |
Yes | account to transfer to (spot, perp) |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.accountIndex | string |
No | account index |
| params.toAccountIndex | string |
No | to account index, defaults to fromAccountIndex |
| params.apiKeyIndex | string |
No | api key index |
| params.memo | string |
No | hex encoding memo |
lighter.transfer (code, amount, fromAccount, toAccount[, params])fetch a history of internal transfers made on an account
Kind: instance method of lighter
Returns: Array<object> - a list of transfer structures
See: https://apidocs.lighter.xyz/reference/transfer_history
| Param | Type | Required | Description |
|---|---|---|---|
| code | string |
Yes | unified currency code of the currency transferred |
| since | int |
No | the earliest time in ms to fetch transfers for |
| limit | int |
No | the maximum number of transfers structures to retrieve |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.accountIndex | string |
No | account index |
| params.paginate | boolean |
No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters |
lighter.fetchTransfers (code[, since, limit, params])fetch all deposits made to an account
Kind: instance method of lighter
Returns: Array<object> - a list of transaction structures
See: https://apidocs.lighter.xyz/reference/deposit_history
| Param | Type | Required | Description |
|---|---|---|---|
| code | string |
No | unified currency code |
| since | int |
No | the earliest time in ms to fetch deposits for |
| limit | int |
No | the maximum number of deposits structures to retrieve |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.accountIndex | string |
No | account index |
| params.address | string |
No | l1_address |
| params.paginate | boolean |
No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters |
lighter.fetchDeposits ([code, since, limit, params])fetch all withdrawals made from an account
Kind: instance method of lighter
Returns: Array<object> - a list of transaction structures
See: https://apidocs.lighter.xyz/reference/withdraw_history
| Param | Type | Required | Description |
|---|---|---|---|
| code | string |
No | unified currency code |
| since | int |
No | the earliest time in ms to fetch withdrawals for |
| limit | int |
No | the maximum number of withdrawals structures to retrieve |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.accountIndex | string |
No | account index |
| params.paginate | boolean |
No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters |
lighter.fetchWithdrawals ([code, since, limit, params])make a withdrawal
Kind: instance method of lighter
Returns: object - a transaction structure
| Param | Type | Required | Description |
|---|---|---|---|
| code | string |
Yes | unified currency code |
| amount | float |
Yes | the amount to withdraw |
| address | string |
Yes | the address to withdraw to |
| tag | string |
No | |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.accountIndex | string |
No | account index |
| params.apiKeyIndex | string |
No | api key index |
| params.routeType | int |
No | wallet type, 0: perp, 1: spot, default is 0 |
lighter.withdraw (code, amount, address[, tag, params])fetch all trades made by the user
Kind: instance method of lighter
Returns: Array<object> - a list of trade structures
See: https://apidocs.lighter.xyz/reference/trades
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
No | unified market symbol |
| since | int |
No | the earliest time in ms to fetch trades for |
| limit | int |
No | the maximum number of trades structures to retrieve |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.accountIndex | string |
No | account index |
| params.paginate | boolean |
No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters |
| params.until | int |
No | timestamp in ms of the latest trade to fetch |
lighter.fetchMyTrades ([symbol, since, limit, params])set the level of leverage for a market
Kind: instance method of lighter
Returns: object - response from the exchange
| Param | Type | Required | Description |
|---|---|---|---|
| leverage | float |
Yes | the rate of leverage |
| symbol | string |
Yes | unified market symbol |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.accountIndex | string |
No | account index |
| params.apiKeyIndex | string |
No | api key index |
| params.marginMode | string |
No | margin mode, 'cross' or 'isolated' |
lighter.setLeverage (leverage, symbol[, params])set margin mode to 'cross' or 'isolated'
Kind: instance method of lighter
Returns: object - response from the exchange
| Param | Type | Required | Description |
|---|---|---|---|
| marginMode | string |
Yes | 'cross' or 'isolated' |
| symbol | string |
Yes | unified market symbol |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.accountIndex | string |
No | account index |
| params.apiKeyIndex | string |
No | api key index |
| params.leverage | int |
No | required leverage |
lighter.setMarginMode (marginMode, symbol[, params])cancels an open order
Kind: instance method of lighter
Returns: object - an order structure
| Param | Type | Required | Description |
|---|---|---|---|
| id | string |
Yes | order id |
| symbol | string |
Yes | unified symbol of the market the order was made in |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.accountIndex | string |
No | account index |
| params.apiKeyIndex | string |
No | api key index |
lighter.cancelOrder (id, symbol[, params])cancel all open orders
Kind: instance method of lighter
Returns: Array<object> - a list of order structures
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
No | unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.accountIndex | string |
No | account index |
| params.apiKeyIndex | string |
No | api key index |
lighter.cancelAllOrders ([symbol, params])dead man's switch, cancel all orders after the given timeout
Kind: instance method of lighter
Returns: object - the api result
| Param | Type | Required | Description |
|---|---|---|---|
| timeout | number |
Yes | time in milliseconds, 0 represents cancel the timer |
| params | object |
No | extra parameters specific to the exchange API endpoint |
lighter.cancelAllOrdersAfter (timeout[, params])add margin
Kind: instance method of lighter
Returns: object - a margin structure
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified market symbol |
| amount | float |
Yes | amount of margin to add |
| params | object |
No | extra parameters specific to the exchange API endpoint |
lighter.addMargin (symbol, amount[, params])remove margin from a position
Kind: instance method of lighter
Returns: object - a margin structure
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified market symbol |
| amount | float |
Yes | the amount of margin to remove |
| params | object |
No | extra parameters specific to the exchange API endpoint |
lighter.reduceMargin (symbol, amount[, params])Either adds or reduces margin in an isolated position in order to set the margin to a specific value
Kind: instance method of lighter
Returns: object - A margin structure
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified market symbol of the market to set margin in |
| amount | float |
Yes | the amount to set the margin to |
| params | object |
No | parameters specific to the bingx api endpoint |
| params.accountIndex | string |
No | account index |
| params.apiKeyIndex | string |
No | api key index |
lighter.setMargin (symbol, amount[, params])watches information on multiple orders made by the user
Kind: instance property of lighter
Returns: Array<object> - a list of order structures
See: https://apidocs.lighter.xyz/docs/websocket-reference#account-all-orders
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified market symbol of the market orders were made in |
| since | int |
No | the earliest time in ms to fetch orders for |
| limit | int |
No | the maximum number of order structures to retrieve |
| params | object |
No | extra parameters specific to the exchange API endpoint |
lighter.watchOrders (symbol[, since, limit, params])watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
Kind: instance method of lighter
Returns: object - A dictionary of order book structures indexed by market symbols
See: https://apidocs.lighter.xyz/docs/websocket-reference#order-book
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to fetch the order book for |
| limit | int |
No | the maximum amount of order book entries to return |
| params | object |
No | extra parameters specific to the exchange API endpoint |
lighter.watchOrderBook (symbol[, limit, params])unWatches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
Kind: instance method of lighter
Returns: object - A dictionary of order book structures indexed by market symbols
See: https://apidocs.lighter.xyz/docs/websocket-reference#order-book
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market |
| params | object |
No | extra parameters specific to the exchange API endpoint |
lighter.unWatchOrderBook (symbol[, params])watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
Kind: instance method of lighter
Returns: object - a ticker structure
See: https://apidocs.lighter.xyz/docs/websocket-reference#market-stats
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to fetch the ticker for |
| params | object |
No | extra parameters specific to the exchange API endpoint |
lighter.watchTicker (symbol[, params])unWatches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list
Kind: instance method of lighter
Returns: object - a ticker structure
See: https://apidocs.lighter.xyz/docs/websocket-reference#market-stats
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to fetch the ticker for |
| params | object |
No | extra parameters specific to the exchange API endpoint |
lighter.unWatchTicker (symbol[, params])watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list
Kind: instance method of lighter
Returns: object - a ticker structure
See: https://apidocs.lighter.xyz/docs/websocket-reference#market-stats
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> |
No | unified symbol of the market to fetch the ticker for |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.channel | string |
No | the channel to subscribe to, tickers by default. Can be tickers, sprd-tickers, index-tickers, block-tickers |
lighter.watchTickers ([symbols, params])unWatches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list
Kind: instance method of lighter
Returns: object - a ticker structure
See: https://apidocs.lighter.xyz/docs/websocket-reference#market-stats
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> |
No | unified symbol of the market to fetch the ticker for |
| params | object |
No | extra parameters specific to the exchange API endpoint |
lighter.unWatchTickers ([symbols, params])watches a mark price
Kind: instance method of lighter
Returns: object - a ticker structure
See: https://apidocs.lighter.xyz/docs/websocket-reference#market-stats
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to fetch the ticker for |
| params | object |
No | extra parameters specific to the exchange API endpoint |
lighter.watchMarkPrice (symbol[, params])watches mark prices
Kind: instance method of lighter
Returns: object - a ticker structure
See: https://apidocs.lighter.xyz/docs/websocket-reference#market-stats
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> |
No | unified symbol of the market to fetch the ticker for |
| params | object |
No | extra parameters specific to the exchange API endpoint |
lighter.watchMarkPrices ([symbols, params])unWatches a mark price
Kind: instance method of lighter
Returns: object - a ticker structure
See: https://apidocs.lighter.xyz/docs/websocket-reference#market-stats
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to fetch the ticker for |
| params | object |
No | extra parameters specific to the exchange API endpoint |
lighter.unWatchMarkPrice (symbol[, params])unWatches mark prices
Kind: instance method of lighter
Returns: object - a ticker structure
See: https://apidocs.lighter.xyz/docs/websocket-reference#market-stats
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> |
No | unified symbol of the market to fetch the ticker for |
| params | object |
No | extra parameters specific to the exchange API endpoint |
lighter.unWatchMarkPrices ([symbols, params])get the list of most recent trades for a particular symbol
Kind: instance method of lighter
Returns: Array<object> - a list of trade structures
See: https://apidocs.lighter.xyz/docs/websocket-reference#trade
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to fetch trades for |
| since | int |
No | timestamp in ms of the earliest trade to fetch |
| limit | int |
No | the maximum amount of trades to fetch |
| params | object |
No | extra parameters specific to the exchange API endpoint |
lighter.watchTrades (symbol[, since, limit, params])unsubscribe from the trades channel
Kind: instance method of lighter
Returns: Array<object> - a list of trade structures
See: https://apidocs.lighter.xyz/docs/websocket-reference#trade
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to fetch trades for |
| params | object |
No | extra parameters specific to the exchange API endpoint |
lighter.unWatchTrades (symbol[, params])subscribe to recent trades of an account.
Kind: instance method of lighter
Returns: Array<object> - a list of trade structures
See: https://apidocs.lighter.xyz/docs/websocket-reference#account-all-trades
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
No | unified market symbol |
| since | int |
No | timestamp in ms of the earliest trade to fetch |
| limit | int |
No | the maximum amount of trades to fetch |
| params | object |
No | extra parameters specific to the exchange API endpoint |
lighter.watchMyTrades ([symbol, since, limit, params])unsubscribe from the account trades channel
Kind: instance method of lighter
Returns: Array<object> - a list of trade structures
See: https://apidocs.lighter.xyz/docs/websocket-reference#account-all-trades
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
No | unified market symbol |
| params | object |
No | extra parameters specific to the exchange API endpoint |
lighter.unWatchMyTrades ([symbol, params])watch the public liquidations of a trading pair
Kind: instance method of lighter
Returns: Array<object> - a list of trade structures
See: https://apidocs.lighter.xyz/docs/websocket-reference#trade
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to fetch trades for |
| since | int |
No | timestamp in ms of the earliest trade to fetch |
| limit | int |
No | the maximum amount of trades to fetch |
| params | object |
No | extra parameters specific to the exchange API endpoint |
lighter.watchLiquidations (symbol[, since, limit, params])watch balance and get the amount of funds available for trading or funds locked in orders
Kind: instance method of lighter
Returns: object - a balance structure
See: https://apidocs.lighter.xyz/docs/websocket-reference#account-all-assets
| Param | Type | Required | Description |
|---|---|---|---|
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.type | string |
No | 'spot' or 'swap', default is 'swap' |
lighter.watchBalance ([params])unWatches information on multiple orders made by the user
Kind: instance method of lighter
Returns: Array<object> - a list of order structures
See: https://apidocs.lighter.xyz/docs/websocket-reference#account-all-orders
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified market symbol of the market orders were made in |
| params | object |
No | extra parameters specific to the exchange API endpoint |
lighter.unWatchOrders (symbol[, params])(If the page is not being rendered for you, you can refer to the mirror at https://docs.ccxt.com/)
- Install
- Examples
- Manual
- CCXT Pro
- Contributing
- Supported Exchanges
- Exchanges By Country
- API Spec By Method
- FAQ
- Changelog
- Awesome
- API Spec by Exchange
- fetchCurrencies
- alpaca
- apex
- arkham
- ascendex
- aster
- backpack
- bigone
- binance
- bingx
- bit2c
- bitbank
- bitbns
- bitfinex
- bitflyer
- bitget
- bithumb
- bitmart
- bitmex
- bitopro
- bitrue
- bitso
- bitstamp
- bitteam
- bittrade
- bitvavo
- blockchaincom
- blofin
- btcbox
- btcmarkets
- btcturk
- bullish
- bybit
- bydfi
- cex
- coinbase
- coinbaseexchange
- coinbaseinternational
- coincheck
- coinex
- coinmate
- coinmetro
- coinone
- coinsph
- coinspot
- cryptocom
- cryptomus
- deepcoin
- delta
- deribit
- derive
- digifinex
- dydx
- exmo
- foxbit
- gate
- gemini
- grvt
- hashkey
- hibachi
- hitbtc
- hollaex
- htx
- hyperliquid
- independentreserve
- indodax
- kraken
- krakenfutures
- kucoin
- fetchBidsAsks
- latoken
- lbank
- lighter
- luno
- mercado
- mexc
- modetrade
- ndax
- novadax
- okx
- onetrading
- oxfun
- p2b
- pacifica
- paradex
- paymium
- phemex
- poloniex
- tokocrypto
- toobit
- upbit
- wavesexchange
- weex
- whitebit
- woo
- woofipro
- xt
- yobit
- zaif
- fetchStatus