> For the complete documentation index, see [llms.txt](https://docs.lighter.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.lighter.xyz/api/models.md).

# Models

## The Account object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"Account":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"account_type":{"type":"integer","format":"uint8"},"account_trading_mode":{"type":"integer","format":"uint8","description":"Classic=0 and Unified=1"},"index":{"type":"integer","format":"int64"},"l1_address":{"type":"string"},"cancel_all_time":{"type":"integer","format":"int64"},"total_order_count":{"type":"integer","format":"int64"},"total_isolated_order_count":{"type":"integer","format":"int64"},"pending_order_count":{"type":"integer","format":"int64"},"available_balance":{"type":"string"},"status":{"type":"integer","format":"uint8"},"collateral":{"type":"string"},"transaction_time":{"type":"integer","format":"int64"}},"title":"Account","required":["code","account_type","index","l1_address","cancel_all_time","total_order_count","total_isolated_order_count","pending_order_count","available_balance","status","collateral","account_trading_mode","transaction_time"]}}}}
```

## The AccountAsset object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"AccountAsset":{"type":"object","properties":{"symbol":{"type":"string"},"asset_id":{"type":"integer","format":"int16"},"balance":{"type":"string"},"locked_balance":{"type":"string"},"margin_balance":{"type":"string"},"margin_mode":{"type":"string","enum":["enabled","disabled"]},"multiplier":{"type":"string"}},"title":"AccountAsset","required":["symbol","asset_id","balance","locked_balance","margin_mode","margin_balance","multiplier"]}}}}
```

## The AccountApiKeys object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"AccountApiKeys":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"api_keys":{"type":"array","items":{"$ref":"#/components/schemas/ApiKey"}}},"title":"AccountApiKeys","required":["code","api_keys"]},"ApiKey":{"type":"object","properties":{"account_index":{"type":"integer","format":"int64"},"api_key_index":{"type":"integer","format":"uint8"},"nonce":{"type":"integer","format":"int64"},"public_key":{"type":"string"},"transaction_time":{"type":"integer","format":"int64"}},"title":"ApiKey","required":["account_index","api_key_index","nonce","public_key","transaction_time"]}}}}
```

## The AccountLimits object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"AccountLimits":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"max_llp_percentage":{"type":"integer","format":"int32"},"user_tier":{"type":"string"},"can_create_public_pool":{"type":"boolean","format":"boolean"},"max_llp_amount":{"type":"string"},"current_maker_fee_tick":{"type":"integer","format":"int32"},"current_taker_fee_tick":{"type":"integer","format":"int32"},"effective_lit_stakes":{"type":"string","description":"Effective staked LIT shares including active leases."},"leased_lit":{"type":"string","description":"Total actively leased LIT."},"user_tier_name":{"type":"string"},"user_tier_last_update":{"type":"integer","format":"int64"},"bo_user_tier_name":{"type":"string"},"bo_fee_rate":{"type":"number","format":"double","description":" Product of the staking and BO volume multipliers; 0.72 means a 28% discount."}},"title":"AccountLimits","required":["code","max_llp_percentage","max_llp_amount","user_tier","can_create_public_pool","user_tier_name","bo_user_tier_name","bo_fee_rate","current_maker_fee_tick","current_taker_fee_tick","leased_lit","effective_lit_stakes"]}}}}
```

## The AccountMetadata object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"AccountMetadata":{"type":"object","properties":{"account_index":{"type":"integer","format":"int64"},"name":{"type":"string"},"description":{"type":"string"},"can_invite":{"type":"boolean","format":"boolean","description":" Remove After FE uses L1 meta endpoint"},"referral_points_percentage":{"type":"string","description":" Remove After FE uses L1 meta endpoint"},"created_at":{"type":"integer","format":"int64"},"can_rfq":{"type":"boolean","format":"boolean"},"can_rfq_market_ids":{"type":"array","items":{"type":"string"}},"metadata":{"$ref":"#/components/schemas/SubAccountMetadata"},"agent_enabled":{"type":"boolean","format":"boolean"}},"title":"AccountMetadata","required":["account_index","name","description","can_invite","referral_points_percentage","can_rfq","can_rfq_market_ids","agent_enabled","created_at","metadata"]},"SubAccountMetadata":{"type":"object","properties":{"color":{"type":"string"}},"title":"SubAccountMetadata","required":["color"]}}}}
```

## The AccountMetadatas object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"AccountMetadatas":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"account_metadatas":{"type":"array","items":{"$ref":"#/components/schemas/AccountMetadata"}},"next_cursor":{"type":"string"}},"title":"AccountMetadatas","required":["code","account_metadatas"]},"AccountMetadata":{"type":"object","properties":{"account_index":{"type":"integer","format":"int64"},"name":{"type":"string"},"description":{"type":"string"},"can_invite":{"type":"boolean","format":"boolean","description":" Remove After FE uses L1 meta endpoint"},"referral_points_percentage":{"type":"string","description":" Remove After FE uses L1 meta endpoint"},"created_at":{"type":"integer","format":"int64"},"can_rfq":{"type":"boolean","format":"boolean"},"can_rfq_market_ids":{"type":"array","items":{"type":"string"}},"metadata":{"$ref":"#/components/schemas/SubAccountMetadata"},"agent_enabled":{"type":"boolean","format":"boolean"}},"title":"AccountMetadata","required":["account_index","name","description","can_invite","referral_points_percentage","can_rfq","can_rfq_market_ids","agent_enabled","created_at","metadata"]},"SubAccountMetadata":{"type":"object","properties":{"color":{"type":"string"}},"title":"SubAccountMetadata","required":["color"]}}}}
```

## The AccountPnL object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"AccountPnL":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"resolution":{"type":"string"},"pnl":{"type":"array","items":{"$ref":"#/components/schemas/PnLEntry"}}},"title":"AccountPnL","required":["code","resolution","pnl"]},"PnLEntry":{"type":"object","properties":{"timestamp":{"type":"integer","format":"int64"},"trade_pnl":{"type":"number","format":"double"},"inflow":{"type":"number","format":"double"},"outflow":{"type":"number","format":"double"},"pool_pnl":{"type":"number","format":"double"},"pool_inflow":{"type":"number","format":"double"},"pool_outflow":{"type":"number","format":"double"},"pool_total_shares":{"type":"number","format":"double"},"spot_inflow":{"type":"number","format":"double"},"spot_outflow":{"type":"number","format":"double"},"staked_lit":{"type":"number","format":"double"},"staking_inflow":{"type":"number","format":"double"},"staking_outflow":{"type":"number","format":"double"},"staking_pnl":{"type":"number","format":"double"},"trade_spot_pnl":{"type":"number","format":"double"},"volume":{"type":"number","format":"double"}},"title":"PnLEntry","required":["timestamp","trade_pnl","inflow","outflow","pool_pnl","pool_inflow","pool_outflow","pool_total_shares","spot_inflow","spot_outflow","staked_lit","staking_inflow","staking_outflow","staking_pnl","trade_spot_pnl","volume"]}}}}
```

## The AccountPosition object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"AccountPosition":{"type":"object","properties":{"market_id":{"type":"integer","format":"int16"},"symbol":{"type":"string"},"initial_margin_fraction":{"type":"string"},"open_order_count":{"type":"integer","format":"int64"},"pending_order_count":{"type":"integer","format":"int64"},"position_tied_order_count":{"type":"integer","format":"int64"},"sign":{"type":"integer","format":"int32"},"position":{"type":"string"},"avg_entry_price":{"type":"string"},"position_value":{"type":"string"},"unrealized_pnl":{"type":"string"},"realized_pnl":{"type":"string"},"liquidation_price":{"type":"string"},"total_funding_paid_out":{"type":"string"},"margin_mode":{"type":"integer","format":"int32"},"allocated_margin":{"type":"string"},"total_discount":{"type":"string"},"margin_set_flag":{"type":"integer","format":"int32"}},"title":"AccountPosition","required":["market_id","symbol","initial_margin_fraction","open_order_count","pending_order_count","position_tied_order_count","sign","position","avg_entry_price","position_value","unrealized_pnl","realized_pnl","liquidation_price","margin_mode","margin_set_flag","allocated_margin","total_discount"]}}}}
```

## The Announcement object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"Announcement":{"type":"object","properties":{"title":{"type":"string"},"content":{"type":"string"},"created_at":{"type":"integer","format":"int64"},"expired_at":{"type":"integer","format":"int64"}},"title":"Announcement","required":["title","content","created_at","expired_at"]}}}}
```

## The Announcements object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"Announcements":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"announcements":{"type":"array","items":{"$ref":"#/components/schemas/Announcement"}}},"title":"Announcements","required":["code","announcements"]},"Announcement":{"type":"object","properties":{"title":{"type":"string"},"content":{"type":"string"},"created_at":{"type":"integer","format":"int64"},"expired_at":{"type":"integer","format":"int64"}},"title":"Announcement","required":["title","content","created_at","expired_at"]}}}}
```

## The Asset object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"Asset":{"type":"object","properties":{"asset_id":{"type":"integer","format":"int16"},"symbol":{"type":"string"},"l1_decimals":{"type":"integer","format":"uint8"},"decimals":{"type":"integer","format":"uint8"},"min_transfer_amount":{"type":"string"},"min_withdrawal_amount":{"type":"string"},"margin_mode":{"type":"string","enum":["enabled","disabled","priced_only"]},"index_price":{"type":"string"},"l1_address":{"type":"string"},"global_supply_cap":{"type":"string"},"liquidation_fee":{"type":"string"},"liquidation_threshold":{"type":"string"},"loan_to_value":{"type":"string"},"price_decimals":{"type":"integer","format":"uint8"},"total_supplied":{"type":"string"},"user_supply_cap":{"type":"string"},"liquidation_factor":{"type":"string"},"multiplier":{"type":"string"}},"title":"Asset","required":["asset_id","symbol","l1_decimals","decimals","min_transfer_amount","min_withdrawal_amount","margin_mode","index_price","price_decimals","l1_address","loan_to_value","liquidation_threshold","liquidation_factor","liquidation_fee","global_supply_cap","user_supply_cap","total_supplied","multiplier"]}}}}
```

## The AssetDetails object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"AssetDetails":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"asset_details":{"type":"array","items":{"$ref":"#/components/schemas/Asset"}}},"title":"AssetDetails","required":["code","asset_details"]},"Asset":{"type":"object","properties":{"asset_id":{"type":"integer","format":"int16"},"symbol":{"type":"string"},"l1_decimals":{"type":"integer","format":"uint8"},"decimals":{"type":"integer","format":"uint8"},"min_transfer_amount":{"type":"string"},"min_withdrawal_amount":{"type":"string"},"margin_mode":{"type":"string","enum":["enabled","disabled","priced_only"]},"index_price":{"type":"string"},"l1_address":{"type":"string"},"global_supply_cap":{"type":"string"},"liquidation_fee":{"type":"string"},"liquidation_threshold":{"type":"string"},"loan_to_value":{"type":"string"},"price_decimals":{"type":"integer","format":"uint8"},"total_supplied":{"type":"string"},"user_supply_cap":{"type":"string"},"liquidation_factor":{"type":"string"},"multiplier":{"type":"string"}},"title":"Asset","required":["asset_id","symbol","l1_decimals","decimals","min_transfer_amount","min_withdrawal_amount","margin_mode","index_price","price_decimals","l1_address","loan_to_value","liquidation_threshold","liquidation_factor","liquidation_fee","global_supply_cap","user_supply_cap","total_supplied","multiplier"]}}}}
```

## The ApiKey object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"ApiKey":{"type":"object","properties":{"account_index":{"type":"integer","format":"int64"},"api_key_index":{"type":"integer","format":"uint8"},"nonce":{"type":"integer","format":"int64"},"public_key":{"type":"string"},"transaction_time":{"type":"integer","format":"int64"}},"title":"ApiKey","required":["account_index","api_key_index","nonce","public_key","transaction_time"]}}}}
```

## The BridgeSupportedNetwork object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"BridgeSupportedNetwork":{"type":"object","properties":{"name":{"type":"string"},"chain_id":{"type":"string"},"explorer":{"type":"string"}},"title":"BridgeSupportedNetwork","required":["name","chain_id","explorer"]}}}}
```

## The Candle object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"Candle":{"type":"object","properties":{"t":{"type":"integer","format":"int64","description":"Timestamp"},"o":{"type":"number","format":"double","description":"Open price"},"h":{"type":"number","format":"double","description":"High price"},"l":{"type":"number","format":"double","description":"Low price"},"c":{"type":"number","format":"double","description":"Close price"},"v":{"type":"number","format":"double","description":"Base token volume (volume0)"},"V":{"type":"number","format":"double","description":"Quote token volume (volume1)"},"i":{"type":"integer","format":"int64","description":"Last trade ID"},"C":{"type":"number","format":"double","description":" close_raw"},"H":{"type":"number","format":"double","description":" high_raw"},"L":{"type":"number","format":"double","description":" low_raw"},"O":{"type":"number","format":"double","description":" open_raw"}},"title":"Candle","description":"Abbreviated candle format. Zero values are omitted.","required":["t","o","h","l","c","v","V","i"]}}}}
```

## The Candles object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"Candles":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"r":{"type":"string","description":"Resolution"},"c":{"type":"array","items":{"$ref":"#/components/schemas/Candle"},"description":"Array of candles (max 500 per call)"},"message":{"type":"string"}},"title":"Candles","required":["code","r","c"]},"Candle":{"type":"object","properties":{"t":{"type":"integer","format":"int64","description":"Timestamp"},"o":{"type":"number","format":"double","description":"Open price"},"h":{"type":"number","format":"double","description":"High price"},"l":{"type":"number","format":"double","description":"Low price"},"c":{"type":"number","format":"double","description":"Close price"},"v":{"type":"number","format":"double","description":"Base token volume (volume0)"},"V":{"type":"number","format":"double","description":"Quote token volume (volume1)"},"i":{"type":"integer","format":"int64","description":"Last trade ID"},"C":{"type":"number","format":"double","description":" close_raw"},"H":{"type":"number","format":"double","description":" high_raw"},"L":{"type":"number","format":"double","description":" low_raw"},"O":{"type":"number","format":"double","description":" open_raw"}},"title":"Candle","description":"Abbreviated candle format. Zero values are omitted.","required":["t","o","h","l","c","v","V","i"]}}}}
```

## The ContractAddress object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"ContractAddress":{"type":"object","properties":{"name":{"type":"string"},"address":{"type":"string"}},"title":"ContractAddress","required":["name","address"]}}}}
```

## The DailyReturn object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"DailyReturn":{"type":"object","properties":{"timestamp":{"type":"integer","format":"int64"},"daily_return":{"type":"number","format":"double"}},"title":"DailyReturn","required":["timestamp","daily_return"]}}}}
```

## The DepositHistory object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"DepositHistory":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"deposits":{"type":"array","items":{"$ref":"#/components/schemas/DepositHistoryItem"}},"cursor":{"type":"string"}},"title":"DepositHistory","required":["code","deposits","cursor"]},"DepositHistoryItem":{"type":"object","properties":{"id":{"type":"string"},"amount":{"type":"string"},"timestamp":{"type":"integer","format":"int64"},"status":{"type":"string","enum":["failed","pending","completed","claimable"]},"l1_tx_hash":{"type":"string"},"asset_id":{"type":"integer","format":"int16"}},"title":"DepositHistoryItem","required":["id","amount","timestamp","status","l1_tx_hash","asset_id"]}}}}
```

## The DepositHistoryItem object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"DepositHistoryItem":{"type":"object","properties":{"id":{"type":"string"},"amount":{"type":"string"},"timestamp":{"type":"integer","format":"int64"},"status":{"type":"string","enum":["failed","pending","completed","claimable"]},"l1_tx_hash":{"type":"string"},"asset_id":{"type":"integer","format":"int16"}},"title":"DepositHistoryItem","required":["id","amount","timestamp","status","l1_tx_hash","asset_id"]}}}}
```

## The DetailedAccount object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"DetailedAccount":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"account_type":{"type":"integer","format":"uint8"},"account_trading_mode":{"type":"integer","format":"uint8","description":"Classic=0 and Unified=1"},"index":{"type":"integer","format":"int64"},"l1_address":{"type":"string"},"cancel_all_time":{"type":"integer","format":"int64"},"total_order_count":{"type":"integer","format":"int64"},"total_isolated_order_count":{"type":"integer","format":"int64"},"pending_order_count":{"type":"integer","format":"int64"},"available_balance":{"type":"string"},"status":{"type":"integer","format":"uint8"},"collateral":{"type":"string"},"account_index":{"type":"integer","format":"int64"},"name":{"type":"string"},"description":{"type":"string"},"can_invite":{"type":"boolean","format":"boolean","description":" Remove After FE uses L1 meta endpoint"},"referral_points_percentage":{"type":"string","description":" Remove After FE uses L1 meta endpoint"},"positions":{"type":"array","items":{"$ref":"#/components/schemas/AccountPosition"}},"assets":{"type":"array","items":{"$ref":"#/components/schemas/AccountAsset"}},"total_asset_value":{"type":"string"},"cross_asset_value":{"type":"string"},"pool_info":{"$ref":"#/components/schemas/PublicPoolInfo"},"shares":{"type":"array","items":{"$ref":"#/components/schemas/PublicPoolShare"}},"created_at":{"type":"integer","format":"int64"},"transaction_time":{"type":"integer","format":"int64"},"pending_unlocks":{"type":"array","items":{"$ref":"#/components/schemas/PendingUnlock"}},"approved_integrators":{"type":"array","items":{"$ref":"#/components/schemas/ApprovedIntegrator"}},"can_rfq":{"type":"boolean","format":"boolean"},"cross_initial_margin_requirement":{"type":"string"},"cross_maintenance_margin_requirement":{"type":"string"},"can_rfq_market_ids":{"type":"array","items":{"type":"string"}},"metadata":{"$ref":"#/components/schemas/SubAccountMetadata"},"agent_enabled":{"type":"boolean","format":"boolean"}},"title":"DetailedAccount","required":["code","account_type","index","l1_address","cancel_all_time","total_order_count","total_isolated_order_count","pending_order_count","available_balance","status","collateral","transaction_time","account_index","name","description","can_invite","referral_points_percentage","can_rfq","can_rfq_market_ids","agent_enabled","created_at","metadata","positions","assets","total_asset_value","cross_asset_value","cross_initial_margin_requirement","cross_maintenance_margin_requirement","pool_info","shares"]},"AccountPosition":{"type":"object","properties":{"market_id":{"type":"integer","format":"int16"},"symbol":{"type":"string"},"initial_margin_fraction":{"type":"string"},"open_order_count":{"type":"integer","format":"int64"},"pending_order_count":{"type":"integer","format":"int64"},"position_tied_order_count":{"type":"integer","format":"int64"},"sign":{"type":"integer","format":"int32"},"position":{"type":"string"},"avg_entry_price":{"type":"string"},"position_value":{"type":"string"},"unrealized_pnl":{"type":"string"},"realized_pnl":{"type":"string"},"liquidation_price":{"type":"string"},"total_funding_paid_out":{"type":"string"},"margin_mode":{"type":"integer","format":"int32"},"allocated_margin":{"type":"string"},"total_discount":{"type":"string"},"margin_set_flag":{"type":"integer","format":"int32"}},"title":"AccountPosition","required":["market_id","symbol","initial_margin_fraction","open_order_count","pending_order_count","position_tied_order_count","sign","position","avg_entry_price","position_value","unrealized_pnl","realized_pnl","liquidation_price","margin_mode","margin_set_flag","allocated_margin","total_discount"]},"AccountAsset":{"type":"object","properties":{"symbol":{"type":"string"},"asset_id":{"type":"integer","format":"int16"},"balance":{"type":"string"},"locked_balance":{"type":"string"},"margin_balance":{"type":"string"},"margin_mode":{"type":"string","enum":["enabled","disabled"]},"multiplier":{"type":"string"}},"title":"AccountAsset","required":["symbol","asset_id","balance","locked_balance","margin_mode","margin_balance","multiplier"]},"PublicPoolInfo":{"type":"object","properties":{"status":{"type":"integer","format":"uint8"},"operator_fee":{"type":"string"},"min_operator_share_rate":{"type":"string"},"total_shares":{"type":"integer","format":"int64"},"operator_shares":{"type":"integer","format":"int64"},"annual_percentage_yield":{"type":"number","format":"double"},"daily_returns":{"type":"array","items":{"$ref":"#/components/schemas/DailyReturn"}},"share_prices":{"type":"array","items":{"$ref":"#/components/schemas/SharePrice"}},"sharpe_ratio":{"type":"number","format":"double"},"strategies":{"type":"array","items":{"$ref":"#/components/schemas/Strategy"}}},"title":"PublicPoolInfo","required":["status","operator_fee","min_operator_share_rate","total_shares","operator_shares","annual_percentage_yield","daily_returns","share_prices","sharpe_ratio","strategies"]},"DailyReturn":{"type":"object","properties":{"timestamp":{"type":"integer","format":"int64"},"daily_return":{"type":"number","format":"double"}},"title":"DailyReturn","required":["timestamp","daily_return"]},"SharePrice":{"type":"object","properties":{"timestamp":{"type":"integer","format":"int64"},"share_price":{"type":"number","format":"double"}},"title":"SharePrice","required":["timestamp","share_price"]},"Strategy":{"type":"object","properties":{"collateral":{"type":"string"}},"required":["collateral"]},"PublicPoolShare":{"type":"object","properties":{"public_pool_index":{"type":"integer","format":"int64"},"shares_amount":{"type":"integer","format":"int64"},"entry_usdc":{"type":"string"},"entry_timestamp":{"type":"integer","format":"int64"},"principal_amount":{"type":"string"}},"title":"PublicPoolShare","required":["public_pool_index","shares_amount","entry_usdc","entry_timestamp","principal_amount"]},"PendingUnlock":{"type":"object","properties":{"unlock_timestamp":{"type":"integer","format":"int64"},"asset_index":{"type":"integer","format":"int16"},"amount":{"type":"string"}},"required":["unlock_timestamp","asset_index","amount"]},"ApprovedIntegrator":{"type":"object","properties":{"account_index":{"type":"integer","format":"int64"},"name":{"type":"string"},"max_perps_taker_fee":{"type":"integer","format":"int32"},"max_perps_maker_fee":{"type":"integer","format":"int32"},"max_spot_taker_fee":{"type":"integer","format":"int32"},"max_spot_maker_fee":{"type":"integer","format":"int32"},"approval_expiry":{"type":"integer","format":"int64","description":" Timestamp in milliseconds, after which the integrator is no longer approved"}},"title":"ApprovedIntegrator","required":["account_index","name","max_perps_taker_fee","max_perps_maker_fee","max_spot_taker_fee","max_spot_maker_fee","approval_expiry"]},"SubAccountMetadata":{"type":"object","properties":{"color":{"type":"string"}},"title":"SubAccountMetadata","required":["color"]}}}}
```

## The DetailedAccounts object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"DetailedAccounts":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"total":{"type":"integer","format":"int64"},"accounts":{"type":"array","items":{"$ref":"#/components/schemas/DetailedAccount"}},"next_cursor":{"type":"string"}},"title":"DetailedAccounts","required":["code","total","accounts","next_cursor"]},"DetailedAccount":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"account_type":{"type":"integer","format":"uint8"},"account_trading_mode":{"type":"integer","format":"uint8","description":"Classic=0 and Unified=1"},"index":{"type":"integer","format":"int64"},"l1_address":{"type":"string"},"cancel_all_time":{"type":"integer","format":"int64"},"total_order_count":{"type":"integer","format":"int64"},"total_isolated_order_count":{"type":"integer","format":"int64"},"pending_order_count":{"type":"integer","format":"int64"},"available_balance":{"type":"string"},"status":{"type":"integer","format":"uint8"},"collateral":{"type":"string"},"account_index":{"type":"integer","format":"int64"},"name":{"type":"string"},"description":{"type":"string"},"can_invite":{"type":"boolean","format":"boolean","description":" Remove After FE uses L1 meta endpoint"},"referral_points_percentage":{"type":"string","description":" Remove After FE uses L1 meta endpoint"},"positions":{"type":"array","items":{"$ref":"#/components/schemas/AccountPosition"}},"assets":{"type":"array","items":{"$ref":"#/components/schemas/AccountAsset"}},"total_asset_value":{"type":"string"},"cross_asset_value":{"type":"string"},"pool_info":{"$ref":"#/components/schemas/PublicPoolInfo"},"shares":{"type":"array","items":{"$ref":"#/components/schemas/PublicPoolShare"}},"created_at":{"type":"integer","format":"int64"},"transaction_time":{"type":"integer","format":"int64"},"pending_unlocks":{"type":"array","items":{"$ref":"#/components/schemas/PendingUnlock"}},"approved_integrators":{"type":"array","items":{"$ref":"#/components/schemas/ApprovedIntegrator"}},"can_rfq":{"type":"boolean","format":"boolean"},"cross_initial_margin_requirement":{"type":"string"},"cross_maintenance_margin_requirement":{"type":"string"},"can_rfq_market_ids":{"type":"array","items":{"type":"string"}},"metadata":{"$ref":"#/components/schemas/SubAccountMetadata"},"agent_enabled":{"type":"boolean","format":"boolean"}},"title":"DetailedAccount","required":["code","account_type","index","l1_address","cancel_all_time","total_order_count","total_isolated_order_count","pending_order_count","available_balance","status","collateral","transaction_time","account_index","name","description","can_invite","referral_points_percentage","can_rfq","can_rfq_market_ids","agent_enabled","created_at","metadata","positions","assets","total_asset_value","cross_asset_value","cross_initial_margin_requirement","cross_maintenance_margin_requirement","pool_info","shares"]},"AccountPosition":{"type":"object","properties":{"market_id":{"type":"integer","format":"int16"},"symbol":{"type":"string"},"initial_margin_fraction":{"type":"string"},"open_order_count":{"type":"integer","format":"int64"},"pending_order_count":{"type":"integer","format":"int64"},"position_tied_order_count":{"type":"integer","format":"int64"},"sign":{"type":"integer","format":"int32"},"position":{"type":"string"},"avg_entry_price":{"type":"string"},"position_value":{"type":"string"},"unrealized_pnl":{"type":"string"},"realized_pnl":{"type":"string"},"liquidation_price":{"type":"string"},"total_funding_paid_out":{"type":"string"},"margin_mode":{"type":"integer","format":"int32"},"allocated_margin":{"type":"string"},"total_discount":{"type":"string"},"margin_set_flag":{"type":"integer","format":"int32"}},"title":"AccountPosition","required":["market_id","symbol","initial_margin_fraction","open_order_count","pending_order_count","position_tied_order_count","sign","position","avg_entry_price","position_value","unrealized_pnl","realized_pnl","liquidation_price","margin_mode","margin_set_flag","allocated_margin","total_discount"]},"AccountAsset":{"type":"object","properties":{"symbol":{"type":"string"},"asset_id":{"type":"integer","format":"int16"},"balance":{"type":"string"},"locked_balance":{"type":"string"},"margin_balance":{"type":"string"},"margin_mode":{"type":"string","enum":["enabled","disabled"]},"multiplier":{"type":"string"}},"title":"AccountAsset","required":["symbol","asset_id","balance","locked_balance","margin_mode","margin_balance","multiplier"]},"PublicPoolInfo":{"type":"object","properties":{"status":{"type":"integer","format":"uint8"},"operator_fee":{"type":"string"},"min_operator_share_rate":{"type":"string"},"total_shares":{"type":"integer","format":"int64"},"operator_shares":{"type":"integer","format":"int64"},"annual_percentage_yield":{"type":"number","format":"double"},"daily_returns":{"type":"array","items":{"$ref":"#/components/schemas/DailyReturn"}},"share_prices":{"type":"array","items":{"$ref":"#/components/schemas/SharePrice"}},"sharpe_ratio":{"type":"number","format":"double"},"strategies":{"type":"array","items":{"$ref":"#/components/schemas/Strategy"}}},"title":"PublicPoolInfo","required":["status","operator_fee","min_operator_share_rate","total_shares","operator_shares","annual_percentage_yield","daily_returns","share_prices","sharpe_ratio","strategies"]},"DailyReturn":{"type":"object","properties":{"timestamp":{"type":"integer","format":"int64"},"daily_return":{"type":"number","format":"double"}},"title":"DailyReturn","required":["timestamp","daily_return"]},"SharePrice":{"type":"object","properties":{"timestamp":{"type":"integer","format":"int64"},"share_price":{"type":"number","format":"double"}},"title":"SharePrice","required":["timestamp","share_price"]},"Strategy":{"type":"object","properties":{"collateral":{"type":"string"}},"required":["collateral"]},"PublicPoolShare":{"type":"object","properties":{"public_pool_index":{"type":"integer","format":"int64"},"shares_amount":{"type":"integer","format":"int64"},"entry_usdc":{"type":"string"},"entry_timestamp":{"type":"integer","format":"int64"},"principal_amount":{"type":"string"}},"title":"PublicPoolShare","required":["public_pool_index","shares_amount","entry_usdc","entry_timestamp","principal_amount"]},"PendingUnlock":{"type":"object","properties":{"unlock_timestamp":{"type":"integer","format":"int64"},"asset_index":{"type":"integer","format":"int16"},"amount":{"type":"string"}},"required":["unlock_timestamp","asset_index","amount"]},"ApprovedIntegrator":{"type":"object","properties":{"account_index":{"type":"integer","format":"int64"},"name":{"type":"string"},"max_perps_taker_fee":{"type":"integer","format":"int32"},"max_perps_maker_fee":{"type":"integer","format":"int32"},"max_spot_taker_fee":{"type":"integer","format":"int32"},"max_spot_maker_fee":{"type":"integer","format":"int32"},"approval_expiry":{"type":"integer","format":"int64","description":" Timestamp in milliseconds, after which the integrator is no longer approved"}},"title":"ApprovedIntegrator","required":["account_index","name","max_perps_taker_fee","max_perps_maker_fee","max_spot_taker_fee","max_spot_maker_fee","approval_expiry"]},"SubAccountMetadata":{"type":"object","properties":{"color":{"type":"string"}},"title":"SubAccountMetadata","required":["color"]}}}}
```

## The EnrichedTx object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"EnrichedTx":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"hash":{"type":"string"},"type":{"type":"integer","format":"uint8","maximum":64,"minimum":1},"info":{"type":"string"},"event_info":{"type":"string"},"status":{"type":"integer","format":"int64"},"transaction_index":{"type":"integer","format":"int64"},"l1_address":{"type":"string"},"account_index":{"type":"integer","format":"int64"},"nonce":{"type":"integer","format":"int64"},"expire_at":{"type":"integer","format":"int64"},"block_height":{"type":"integer","format":"int64"},"queued_at":{"type":"integer","format":"int64"},"executed_at":{"type":"integer","format":"int64"},"sequence_index":{"type":"integer","format":"int64"},"parent_hash":{"type":"string"},"api_key_index":{"type":"integer","format":"uint8"},"transaction_time":{"type":"integer","format":"int64"},"committed_at":{"type":"integer","format":"int64"},"verified_at":{"type":"integer","format":"int64"}},"title":"EnrichedTx","required":["code","hash","type","info","event_info","status","transaction_index","l1_address","account_index","nonce","expire_at","block_height","queued_at","executed_at","sequence_index","parent_hash","api_key_index","transaction_time","committed_at","verified_at"]}}}}
```

## The ExchangeStats object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"ExchangeStats":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"total":{"type":"integer","format":"int64"},"order_book_stats":{"type":"array","items":{"$ref":"#/components/schemas/OrderBookStats"}},"daily_usd_volume":{"type":"number","format":"double"},"daily_trades_count":{"type":"integer","format":"int64"}},"title":"ExchangeStats","required":["code","total","order_book_stats","daily_usd_volume","daily_trades_count"]},"OrderBookStats":{"type":"object","properties":{"symbol":{"type":"string"},"last_trade_price":{"type":"number","format":"double"},"daily_trades_count":{"type":"integer","format":"int64"},"daily_base_token_volume":{"type":"number","format":"double"},"daily_quote_token_volume":{"type":"number","format":"double"},"daily_price_change":{"type":"number","format":"double"}},"title":"OrderBookStats","required":["symbol","last_trade_price","daily_trades_count","daily_base_token_volume","daily_quote_token_volume","daily_price_change"]}}}}
```

## The ExportData object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"ExportData":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"data_url":{"type":"string"}},"title":"ExportData","required":["code","data_url"]}}}}
```

## The Funding object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"Funding":{"type":"object","properties":{"timestamp":{"type":"integer","format":"int64"},"value":{"type":"string"},"rate":{"type":"string"},"direction":{"type":"string"}},"title":"Funding","required":["timestamp","value","rate","direction"]}}}}
```

## The FundingRate object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"FundingRate":{"type":"object","properties":{"market_id":{"type":"integer","format":"int16"},"exchange":{"type":"string","enum":["binance","bybit","hyperliquid","lighter"]},"symbol":{"type":"string"},"rate":{"type":"number","format":"double"}},"title":"FundingRate","required":["market_id","exchange","symbol","rate"]}}}}
```

## The FundingRates object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"FundingRates":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"funding_rates":{"type":"array","items":{"$ref":"#/components/schemas/FundingRate"}}},"title":"FundingRates","required":["code","funding_rates"]},"FundingRate":{"type":"object","properties":{"market_id":{"type":"integer","format":"int16"},"exchange":{"type":"string","enum":["binance","bybit","hyperliquid","lighter"]},"symbol":{"type":"string"},"rate":{"type":"number","format":"double"}},"title":"FundingRate","required":["market_id","exchange","symbol","rate"]}}}}
```

## The Fundings object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"Fundings":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"resolution":{"type":"string"},"fundings":{"type":"array","items":{"$ref":"#/components/schemas/Funding"}}},"title":"Fundings","required":["code","resolution","fundings"]},"Funding":{"type":"object","properties":{"timestamp":{"type":"integer","format":"int64"},"value":{"type":"string"},"rate":{"type":"string"},"direction":{"type":"string"}},"title":"Funding","required":["timestamp","value","rate","direction"]}}}}
```

## The L1Metadata object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"L1Metadata":{"type":"object","properties":{"l1_address":{"type":"string"},"can_invite":{"type":"boolean","format":"boolean"},"referral_points_percentage":{"type":"string"},"referral_program_kickback":{"type":"string"},"referral_program_kickback_history":{"type":"array","items":{"$ref":"#/components/schemas/ReferralProgramKickback"}}},"title":"L1Metadata","required":["l1_address","can_invite","referral_points_percentage","referral_program_kickback","referral_program_kickback_history"]},"ReferralProgramKickback":{"type":"object","properties":{"date":{"type":"integer","format":"int64"},"percentage":{"type":"string"}},"title":"ReferralProgramKickback","required":["date","percentage"]}}}}
```

## The L1ProviderInfo object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"L1ProviderInfo":{"type":"object","properties":{"chainId":{"type":"integer","format":"int64"},"networkId":{"type":"integer","format":"int64"},"latestBlockNumber":{"type":"integer","format":"int64"}},"title":"L1ProviderInfo","required":["chainId","networkId","latestBlockNumber"]}}}}
```

## The LiqTrade object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"LiqTrade":{"type":"object","properties":{"price":{"type":"string"},"size":{"type":"string"},"taker_fee":{"type":"string"},"maker_fee":{"type":"string"},"transaction_time":{"type":"integer","format":"int64"},"bid_account_id":{"type":"integer","format":"int64"},"ask_account_id":{"type":"integer","format":"int64"}},"title":"LiqTrade","required":["price","size","taker_fee","maker_fee","transaction_time","ask_account_id","bid_account_id"]}}}}
```

## The Liquidation object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"Liquidation":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"market_id":{"type":"integer","format":"int16"},"type":{"type":"string","enum":["partial","deleverage"]},"trade":{"$ref":"#/components/schemas/LiqTrade"},"info":{"$ref":"#/components/schemas/LiquidationInfo"},"executed_at":{"type":"integer","format":"int64"}},"title":"Liquidation","required":["id","market_id","type","trade","info","executed_at"]},"LiqTrade":{"type":"object","properties":{"price":{"type":"string"},"size":{"type":"string"},"taker_fee":{"type":"string"},"maker_fee":{"type":"string"},"transaction_time":{"type":"integer","format":"int64"},"bid_account_id":{"type":"integer","format":"int64"},"ask_account_id":{"type":"integer","format":"int64"}},"title":"LiqTrade","required":["price","size","taker_fee","maker_fee","transaction_time","ask_account_id","bid_account_id"]},"LiquidationInfo":{"type":"object","properties":{"positions":{"type":"array","items":{"$ref":"#/components/schemas/AccountPosition"}},"risk_info_before":{"$ref":"#/components/schemas/RiskInfo"},"risk_info_after":{"$ref":"#/components/schemas/RiskInfo"},"mark_prices":{"type":"object","additionalProperties":{"type":"number","format":"double"}},"assets":{"type":"array","items":{"$ref":"#/components/schemas/AccountAsset"}},"asset_index_prices":{"type":"object","additionalProperties":{"type":"string"}}},"title":"LiquidationInfo","required":["positions","risk_info_before","risk_info_after","mark_prices","assets","asset_index_prices"]},"AccountPosition":{"type":"object","properties":{"market_id":{"type":"integer","format":"int16"},"symbol":{"type":"string"},"initial_margin_fraction":{"type":"string"},"open_order_count":{"type":"integer","format":"int64"},"pending_order_count":{"type":"integer","format":"int64"},"position_tied_order_count":{"type":"integer","format":"int64"},"sign":{"type":"integer","format":"int32"},"position":{"type":"string"},"avg_entry_price":{"type":"string"},"position_value":{"type":"string"},"unrealized_pnl":{"type":"string"},"realized_pnl":{"type":"string"},"liquidation_price":{"type":"string"},"total_funding_paid_out":{"type":"string"},"margin_mode":{"type":"integer","format":"int32"},"allocated_margin":{"type":"string"},"total_discount":{"type":"string"},"margin_set_flag":{"type":"integer","format":"int32"}},"title":"AccountPosition","required":["market_id","symbol","initial_margin_fraction","open_order_count","pending_order_count","position_tied_order_count","sign","position","avg_entry_price","position_value","unrealized_pnl","realized_pnl","liquidation_price","margin_mode","margin_set_flag","allocated_margin","total_discount"]},"RiskInfo":{"type":"object","properties":{"cross_risk_parameters":{"$ref":"#/components/schemas/RiskParameters"},"isolated_risk_parameters":{"type":"array","items":{"$ref":"#/components/schemas/RiskParameters"}}},"title":"RiskInfo","required":["cross_risk_parameters","isolated_risk_parameters"]},"RiskParameters":{"type":"object","properties":{"market_id":{"type":"integer","format":"int16"},"collateral":{"type":"string"},"total_account_value":{"type":"string"},"initial_margin_req":{"type":"string"},"maintenance_margin_req":{"type":"string"},"close_out_margin_req":{"type":"string"},"total_account_liquidation_threshold":{"type":"string"},"usdc_collateral_with_funding":{"type":"string"},"usdc_portfolio_value":{"type":"string"},"total_portfolio_value":{"type":"string"}},"title":"RiskParameters","required":["market_id","total_account_value","initial_margin_req","maintenance_margin_req","close_out_margin_req","total_account_liquidation_threshold","collateral","usdc_collateral_with_funding","usdc_portfolio_value","total_portfolio_value"]},"AccountAsset":{"type":"object","properties":{"symbol":{"type":"string"},"asset_id":{"type":"integer","format":"int16"},"balance":{"type":"string"},"locked_balance":{"type":"string"},"margin_balance":{"type":"string"},"margin_mode":{"type":"string","enum":["enabled","disabled"]},"multiplier":{"type":"string"}},"title":"AccountAsset","required":["symbol","asset_id","balance","locked_balance","margin_mode","margin_balance","multiplier"]}}}}
```

## The LiquidationInfo object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"LiquidationInfo":{"type":"object","properties":{"positions":{"type":"array","items":{"$ref":"#/components/schemas/AccountPosition"}},"risk_info_before":{"$ref":"#/components/schemas/RiskInfo"},"risk_info_after":{"$ref":"#/components/schemas/RiskInfo"},"mark_prices":{"type":"object","additionalProperties":{"type":"number","format":"double"}},"assets":{"type":"array","items":{"$ref":"#/components/schemas/AccountAsset"}},"asset_index_prices":{"type":"object","additionalProperties":{"type":"string"}}},"title":"LiquidationInfo","required":["positions","risk_info_before","risk_info_after","mark_prices","assets","asset_index_prices"]},"AccountPosition":{"type":"object","properties":{"market_id":{"type":"integer","format":"int16"},"symbol":{"type":"string"},"initial_margin_fraction":{"type":"string"},"open_order_count":{"type":"integer","format":"int64"},"pending_order_count":{"type":"integer","format":"int64"},"position_tied_order_count":{"type":"integer","format":"int64"},"sign":{"type":"integer","format":"int32"},"position":{"type":"string"},"avg_entry_price":{"type":"string"},"position_value":{"type":"string"},"unrealized_pnl":{"type":"string"},"realized_pnl":{"type":"string"},"liquidation_price":{"type":"string"},"total_funding_paid_out":{"type":"string"},"margin_mode":{"type":"integer","format":"int32"},"allocated_margin":{"type":"string"},"total_discount":{"type":"string"},"margin_set_flag":{"type":"integer","format":"int32"}},"title":"AccountPosition","required":["market_id","symbol","initial_margin_fraction","open_order_count","pending_order_count","position_tied_order_count","sign","position","avg_entry_price","position_value","unrealized_pnl","realized_pnl","liquidation_price","margin_mode","margin_set_flag","allocated_margin","total_discount"]},"RiskInfo":{"type":"object","properties":{"cross_risk_parameters":{"$ref":"#/components/schemas/RiskParameters"},"isolated_risk_parameters":{"type":"array","items":{"$ref":"#/components/schemas/RiskParameters"}}},"title":"RiskInfo","required":["cross_risk_parameters","isolated_risk_parameters"]},"RiskParameters":{"type":"object","properties":{"market_id":{"type":"integer","format":"int16"},"collateral":{"type":"string"},"total_account_value":{"type":"string"},"initial_margin_req":{"type":"string"},"maintenance_margin_req":{"type":"string"},"close_out_margin_req":{"type":"string"},"total_account_liquidation_threshold":{"type":"string"},"usdc_collateral_with_funding":{"type":"string"},"usdc_portfolio_value":{"type":"string"},"total_portfolio_value":{"type":"string"}},"title":"RiskParameters","required":["market_id","total_account_value","initial_margin_req","maintenance_margin_req","close_out_margin_req","total_account_liquidation_threshold","collateral","usdc_collateral_with_funding","usdc_portfolio_value","total_portfolio_value"]},"AccountAsset":{"type":"object","properties":{"symbol":{"type":"string"},"asset_id":{"type":"integer","format":"int16"},"balance":{"type":"string"},"locked_balance":{"type":"string"},"margin_balance":{"type":"string"},"margin_mode":{"type":"string","enum":["enabled","disabled"]},"multiplier":{"type":"string"}},"title":"AccountAsset","required":["symbol","asset_id","balance","locked_balance","margin_mode","margin_balance","multiplier"]}}}}
```

## The LiquidationInfos object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"LiquidationInfos":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"liquidations":{"type":"array","items":{"$ref":"#/components/schemas/Liquidation"}},"next_cursor":{"type":"string"}},"title":"LiquidationInfos","required":["code","liquidations"]},"Liquidation":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"market_id":{"type":"integer","format":"int16"},"type":{"type":"string","enum":["partial","deleverage"]},"trade":{"$ref":"#/components/schemas/LiqTrade"},"info":{"$ref":"#/components/schemas/LiquidationInfo"},"executed_at":{"type":"integer","format":"int64"}},"title":"Liquidation","required":["id","market_id","type","trade","info","executed_at"]},"LiqTrade":{"type":"object","properties":{"price":{"type":"string"},"size":{"type":"string"},"taker_fee":{"type":"string"},"maker_fee":{"type":"string"},"transaction_time":{"type":"integer","format":"int64"},"bid_account_id":{"type":"integer","format":"int64"},"ask_account_id":{"type":"integer","format":"int64"}},"title":"LiqTrade","required":["price","size","taker_fee","maker_fee","transaction_time","ask_account_id","bid_account_id"]},"LiquidationInfo":{"type":"object","properties":{"positions":{"type":"array","items":{"$ref":"#/components/schemas/AccountPosition"}},"risk_info_before":{"$ref":"#/components/schemas/RiskInfo"},"risk_info_after":{"$ref":"#/components/schemas/RiskInfo"},"mark_prices":{"type":"object","additionalProperties":{"type":"number","format":"double"}},"assets":{"type":"array","items":{"$ref":"#/components/schemas/AccountAsset"}},"asset_index_prices":{"type":"object","additionalProperties":{"type":"string"}}},"title":"LiquidationInfo","required":["positions","risk_info_before","risk_info_after","mark_prices","assets","asset_index_prices"]},"AccountPosition":{"type":"object","properties":{"market_id":{"type":"integer","format":"int16"},"symbol":{"type":"string"},"initial_margin_fraction":{"type":"string"},"open_order_count":{"type":"integer","format":"int64"},"pending_order_count":{"type":"integer","format":"int64"},"position_tied_order_count":{"type":"integer","format":"int64"},"sign":{"type":"integer","format":"int32"},"position":{"type":"string"},"avg_entry_price":{"type":"string"},"position_value":{"type":"string"},"unrealized_pnl":{"type":"string"},"realized_pnl":{"type":"string"},"liquidation_price":{"type":"string"},"total_funding_paid_out":{"type":"string"},"margin_mode":{"type":"integer","format":"int32"},"allocated_margin":{"type":"string"},"total_discount":{"type":"string"},"margin_set_flag":{"type":"integer","format":"int32"}},"title":"AccountPosition","required":["market_id","symbol","initial_margin_fraction","open_order_count","pending_order_count","position_tied_order_count","sign","position","avg_entry_price","position_value","unrealized_pnl","realized_pnl","liquidation_price","margin_mode","margin_set_flag","allocated_margin","total_discount"]},"RiskInfo":{"type":"object","properties":{"cross_risk_parameters":{"$ref":"#/components/schemas/RiskParameters"},"isolated_risk_parameters":{"type":"array","items":{"$ref":"#/components/schemas/RiskParameters"}}},"title":"RiskInfo","required":["cross_risk_parameters","isolated_risk_parameters"]},"RiskParameters":{"type":"object","properties":{"market_id":{"type":"integer","format":"int16"},"collateral":{"type":"string"},"total_account_value":{"type":"string"},"initial_margin_req":{"type":"string"},"maintenance_margin_req":{"type":"string"},"close_out_margin_req":{"type":"string"},"total_account_liquidation_threshold":{"type":"string"},"usdc_collateral_with_funding":{"type":"string"},"usdc_portfolio_value":{"type":"string"},"total_portfolio_value":{"type":"string"}},"title":"RiskParameters","required":["market_id","total_account_value","initial_margin_req","maintenance_margin_req","close_out_margin_req","total_account_liquidation_threshold","collateral","usdc_collateral_with_funding","usdc_portfolio_value","total_portfolio_value"]},"AccountAsset":{"type":"object","properties":{"symbol":{"type":"string"},"asset_id":{"type":"integer","format":"int16"},"balance":{"type":"string"},"locked_balance":{"type":"string"},"margin_balance":{"type":"string"},"margin_mode":{"type":"string","enum":["enabled","disabled"]},"multiplier":{"type":"string"}},"title":"AccountAsset","required":["symbol","asset_id","balance","locked_balance","margin_mode","margin_balance","multiplier"]}}}}
```

## The MarketConfig object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"MarketConfig":{"type":"object","properties":{"market_margin_mode":{"type":"integer","format":"int32"},"insurance_fund_account_index":{"type":"integer","format":"int64"},"liquidation_mode":{"type":"integer","format":"int32"},"force_reduce_only":{"type":"boolean","format":"boolean"},"funding_fee_discounts_enabled":{"type":"boolean","format":"boolean"},"trading_hours":{"type":"string"},"hidden":{"type":"boolean"},"rfq_enabled":{"type":"boolean","format":"boolean"}},"title":"MarketConfig","required":["market_margin_mode","insurance_fund_account_index","liquidation_mode","force_reduce_only","trading_hours","hidden","rfq_enabled"]}}}}
```

## The NextNonce object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"NextNonce":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"nonce":{"type":"integer","format":"int64"}},"title":"NextNonce","required":["code","nonce"]}}}}
```

## The Order object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"Order":{"type":"object","properties":{"order_index":{"type":"integer","format":"int64"},"client_order_index":{"type":"integer","format":"int64"},"order_id":{"type":"string"},"client_order_id":{"type":"string"},"market_index":{"type":"integer","format":"int16"},"owner_account_index":{"type":"integer","format":"int64"},"initial_base_amount":{"type":"string"},"price":{"type":"string"},"nonce":{"type":"integer","format":"int64"},"remaining_base_amount":{"type":"string"},"is_ask":{"type":"boolean","format":"boolean"},"base_size":{"type":"integer","format":"int64"},"base_price":{"type":"integer","format":"int32"},"filled_base_amount":{"type":"string"},"filled_quote_amount":{"type":"string"},"side":{"type":"string","default":"buy","description":" TODO: remove this"},"type":{"type":"string","enum":["limit","market","stop-loss","stop-loss-limit","take-profit","take-profit-limit","twap","twap-sub","liquidation"]},"time_in_force":{"type":"string","enum":["good-till-time","immediate-or-cancel","post-only","Unknown"],"default":"good-till-time"},"reduce_only":{"type":"boolean","format":"boolean"},"trigger_price":{"type":"string"},"order_expiry":{"type":"integer","format":"int64"},"status":{"type":"string","enum":["in-progress","pending","open","filled","canceled","canceled-post-only","canceled-reduce-only","canceled-position-not-allowed","canceled-margin-not-allowed","canceled-too-much-slippage","canceled-not-enough-liquidity","canceled-self-trade","canceled-expired","canceled-oco","canceled-child","canceled-liquidation","canceled-invalid-balance"]},"trigger_status":{"type":"string","enum":["na","ready","mark-price","twap","parent-order"]},"trigger_time":{"type":"integer","format":"int64"},"parent_order_index":{"type":"integer","format":"int64"},"parent_order_id":{"type":"string"},"to_trigger_order_id_0":{"type":"string"},"to_trigger_order_id_1":{"type":"string"},"to_cancel_order_id_0":{"type":"string"},"block_height":{"type":"integer","format":"int64"},"timestamp":{"type":"integer","format":"int64"},"created_at":{"type":"integer","format":"int64"},"updated_at":{"type":"integer","format":"int64"},"transaction_time":{"type":"integer","format":"int64"},"integrator_fee_collector_index":{"type":"string"},"integrator_maker_fee":{"type":"string"},"integrator_taker_fee":{"type":"string"},"order_flags":{"type":"integer","format":"int64"},"order_version":{"type":"integer","format":"int64"}},"title":"Order","required":["order_index","client_order_index","order_id","client_order_id","market_index","owner_account_index","initial_base_amount","price","nonce","remaining_base_amount","is_ask","base_size","base_price","filled_base_amount","filled_quote_amount","side","type","time_in_force","reduce_only","trigger_price","order_expiry","status","trigger_status","trigger_time","parent_order_index","parent_order_id","to_trigger_order_id_0","to_trigger_order_id_1","to_cancel_order_id_0","integrator_fee_collector_index","integrator_taker_fee","integrator_maker_fee","order_flags","block_height","timestamp","created_at","updated_at","transaction_time","order_version"]}}}}
```

## The OrderBook object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"OrderBook":{"type":"object","properties":{"symbol":{"type":"string"},"market_id":{"type":"integer","format":"int16"},"market_type":{"type":"string","enum":["perp","spot"]},"base_asset_id":{"type":"integer","format":"int16"},"quote_asset_id":{"type":"integer","format":"int16"},"status":{"type":"string","enum":["inactive","active"]},"taker_fee":{"type":"string"},"maker_fee":{"type":"string"},"liquidation_fee":{"type":"string"},"min_base_amount":{"type":"string"},"min_quote_amount":{"type":"string"},"supported_size_decimals":{"type":"integer","format":"uint8"},"supported_price_decimals":{"type":"integer","format":"uint8"},"supported_quote_decimals":{"type":"integer","format":"uint8"},"order_quote_limit":{"type":"string"},"is_maker_fee_enabled":{"type":"boolean"},"is_taker_fee_enabled":{"type":"boolean"},"created_at":{"type":"string"},"multiplier":{"type":"string"}},"title":"OrderBook","required":["symbol","market_id","market_type","base_asset_id","quote_asset_id","status","taker_fee","is_taker_fee_enabled","maker_fee","is_maker_fee_enabled","liquidation_fee","min_base_amount","min_quote_amount","order_quote_limit","supported_size_decimals","supported_price_decimals","supported_quote_decimals","created_at","multiplier"]}}}}
```

## The PerpsOrderBookDetail object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"PerpsOrderBookDetail":{"type":"object","properties":{"symbol":{"type":"string"},"market_id":{"type":"integer","format":"int16"},"market_type":{"type":"string","enum":["perp","spot"]},"base_asset_id":{"type":"integer","format":"int16"},"quote_asset_id":{"type":"integer","format":"int16"},"status":{"type":"string","enum":["inactive","active"]},"taker_fee":{"type":"string"},"maker_fee":{"type":"string"},"liquidation_fee":{"type":"string"},"min_base_amount":{"type":"string"},"min_quote_amount":{"type":"string"},"supported_size_decimals":{"type":"integer","format":"uint8"},"supported_price_decimals":{"type":"integer","format":"uint8"},"supported_quote_decimals":{"type":"integer","format":"uint8"},"order_quote_limit":{"type":"string"},"size_decimals":{"type":"integer","format":"uint8"},"price_decimals":{"type":"integer","format":"uint8"},"quote_multiplier":{"type":"integer","format":"int64"},"default_initial_margin_fraction":{"type":"integer","format":"uin16"},"min_initial_margin_fraction":{"type":"integer","format":"uin16"},"maintenance_margin_fraction":{"type":"integer","format":"uin16"},"closeout_margin_fraction":{"type":"integer","format":"uin16"},"last_trade_price":{"type":"number","format":"double"},"daily_trades_count":{"type":"integer","format":"int64"},"daily_base_token_volume":{"type":"number","format":"double"},"daily_quote_token_volume":{"type":"number","format":"double"},"daily_price_low":{"type":"number","format":"double"},"daily_price_high":{"type":"number","format":"double"},"daily_price_change":{"type":"number","format":"double"},"open_interest":{"type":"number","format":"double"},"daily_chart":{"type":"object","additionalProperties":{"type":"number","format":"double"}},"market_config":{"$ref":"#/components/schemas/MarketConfig"},"strategy_index":{"type":"integer","format":"uint8"},"is_maker_fee_enabled":{"type":"boolean"},"is_taker_fee_enabled":{"type":"boolean"},"funding_clamp_small":{"type":"string"},"funding_clamp_big":{"type":"string"},"base_interest_rate":{"type":"string"},"created_at":{"type":"string"},"mark_price":{"type":"string"},"index_price":{"type":"string"},"multiplier":{"type":"string"},"market_flags":{"type":"integer","format":"int64"},"funding_premium_multiplier":{"type":"integer","format":"uin16"}},"title":"PerpsOrderBookDetail","required":["symbol","market_id","market_type","base_asset_id","quote_asset_id","status","taker_fee","is_taker_fee_enabled","maker_fee","is_maker_fee_enabled","liquidation_fee","min_base_amount","min_quote_amount","order_quote_limit","supported_size_decimals","supported_price_decimals","supported_quote_decimals","created_at","multiplier","size_decimals","price_decimals","quote_multiplier","default_initial_margin_fraction","min_initial_margin_fraction","maintenance_margin_fraction","closeout_margin_fraction","mark_price","index_price","last_trade_price","daily_trades_count","daily_base_token_volume","daily_quote_token_volume","daily_price_low","daily_price_high","daily_price_change","open_interest","daily_chart","market_config","strategy_index","market_flags","funding_premium_multiplier","funding_clamp_small","funding_clamp_big","base_interest_rate"]},"MarketConfig":{"type":"object","properties":{"market_margin_mode":{"type":"integer","format":"int32"},"insurance_fund_account_index":{"type":"integer","format":"int64"},"liquidation_mode":{"type":"integer","format":"int32"},"force_reduce_only":{"type":"boolean","format":"boolean"},"funding_fee_discounts_enabled":{"type":"boolean","format":"boolean"},"trading_hours":{"type":"string"},"hidden":{"type":"boolean"},"rfq_enabled":{"type":"boolean","format":"boolean"}},"title":"MarketConfig","required":["market_margin_mode","insurance_fund_account_index","liquidation_mode","force_reduce_only","trading_hours","hidden","rfq_enabled"]}}}}
```

## The OrderBookDetails object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"OrderBookDetails":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"order_book_details":{"type":"array","items":{"$ref":"#/components/schemas/PerpsOrderBookDetail"}},"spot_order_book_details":{"type":"array","items":{"$ref":"#/components/schemas/SpotOrderBookDetail"}}},"title":"OrderBookDetails","required":["code","order_book_details","spot_order_book_details"]},"PerpsOrderBookDetail":{"type":"object","properties":{"symbol":{"type":"string"},"market_id":{"type":"integer","format":"int16"},"market_type":{"type":"string","enum":["perp","spot"]},"base_asset_id":{"type":"integer","format":"int16"},"quote_asset_id":{"type":"integer","format":"int16"},"status":{"type":"string","enum":["inactive","active"]},"taker_fee":{"type":"string"},"maker_fee":{"type":"string"},"liquidation_fee":{"type":"string"},"min_base_amount":{"type":"string"},"min_quote_amount":{"type":"string"},"supported_size_decimals":{"type":"integer","format":"uint8"},"supported_price_decimals":{"type":"integer","format":"uint8"},"supported_quote_decimals":{"type":"integer","format":"uint8"},"order_quote_limit":{"type":"string"},"size_decimals":{"type":"integer","format":"uint8"},"price_decimals":{"type":"integer","format":"uint8"},"quote_multiplier":{"type":"integer","format":"int64"},"default_initial_margin_fraction":{"type":"integer","format":"uin16"},"min_initial_margin_fraction":{"type":"integer","format":"uin16"},"maintenance_margin_fraction":{"type":"integer","format":"uin16"},"closeout_margin_fraction":{"type":"integer","format":"uin16"},"last_trade_price":{"type":"number","format":"double"},"daily_trades_count":{"type":"integer","format":"int64"},"daily_base_token_volume":{"type":"number","format":"double"},"daily_quote_token_volume":{"type":"number","format":"double"},"daily_price_low":{"type":"number","format":"double"},"daily_price_high":{"type":"number","format":"double"},"daily_price_change":{"type":"number","format":"double"},"open_interest":{"type":"number","format":"double"},"daily_chart":{"type":"object","additionalProperties":{"type":"number","format":"double"}},"market_config":{"$ref":"#/components/schemas/MarketConfig"},"strategy_index":{"type":"integer","format":"uint8"},"is_maker_fee_enabled":{"type":"boolean"},"is_taker_fee_enabled":{"type":"boolean"},"funding_clamp_small":{"type":"string"},"funding_clamp_big":{"type":"string"},"base_interest_rate":{"type":"string"},"created_at":{"type":"string"},"mark_price":{"type":"string"},"index_price":{"type":"string"},"multiplier":{"type":"string"},"market_flags":{"type":"integer","format":"int64"},"funding_premium_multiplier":{"type":"integer","format":"uin16"}},"title":"PerpsOrderBookDetail","required":["symbol","market_id","market_type","base_asset_id","quote_asset_id","status","taker_fee","is_taker_fee_enabled","maker_fee","is_maker_fee_enabled","liquidation_fee","min_base_amount","min_quote_amount","order_quote_limit","supported_size_decimals","supported_price_decimals","supported_quote_decimals","created_at","multiplier","size_decimals","price_decimals","quote_multiplier","default_initial_margin_fraction","min_initial_margin_fraction","maintenance_margin_fraction","closeout_margin_fraction","mark_price","index_price","last_trade_price","daily_trades_count","daily_base_token_volume","daily_quote_token_volume","daily_price_low","daily_price_high","daily_price_change","open_interest","daily_chart","market_config","strategy_index","market_flags","funding_premium_multiplier","funding_clamp_small","funding_clamp_big","base_interest_rate"]},"MarketConfig":{"type":"object","properties":{"market_margin_mode":{"type":"integer","format":"int32"},"insurance_fund_account_index":{"type":"integer","format":"int64"},"liquidation_mode":{"type":"integer","format":"int32"},"force_reduce_only":{"type":"boolean","format":"boolean"},"funding_fee_discounts_enabled":{"type":"boolean","format":"boolean"},"trading_hours":{"type":"string"},"hidden":{"type":"boolean"},"rfq_enabled":{"type":"boolean","format":"boolean"}},"title":"MarketConfig","required":["market_margin_mode","insurance_fund_account_index","liquidation_mode","force_reduce_only","trading_hours","hidden","rfq_enabled"]},"SpotOrderBookDetail":{"type":"object","properties":{"symbol":{"type":"string"},"market_id":{"type":"integer","format":"int16"},"market_type":{"type":"string","enum":["perp","spot"]},"base_asset_id":{"type":"integer","format":"int16"},"quote_asset_id":{"type":"integer","format":"int16"},"status":{"type":"string","enum":["inactive","active"]},"taker_fee":{"type":"string"},"maker_fee":{"type":"string"},"liquidation_fee":{"type":"string"},"min_base_amount":{"type":"string"},"min_quote_amount":{"type":"string"},"order_quote_limit":{"type":"string"},"supported_size_decimals":{"type":"integer","format":"uint8"},"supported_price_decimals":{"type":"integer","format":"uint8"},"supported_quote_decimals":{"type":"integer","format":"uint8"},"size_decimals":{"type":"integer","format":"uint8"},"price_decimals":{"type":"integer","format":"uint8"},"last_trade_price":{"type":"number","format":"double"},"daily_trades_count":{"type":"integer","format":"int64"},"daily_base_token_volume":{"type":"number","format":"double"},"daily_quote_token_volume":{"type":"number","format":"double"},"daily_price_low":{"type":"number","format":"double"},"daily_price_high":{"type":"number","format":"double"},"daily_price_change":{"type":"number","format":"double"},"daily_chart":{"type":"object","additionalProperties":{"type":"number","format":"double"}},"is_maker_fee_enabled":{"type":"boolean"},"is_taker_fee_enabled":{"type":"boolean"},"created_at":{"type":"string"},"multiplier":{"type":"string"}},"title":"SpotOrderBookDetail","required":["symbol","market_id","market_type","base_asset_id","quote_asset_id","status","taker_fee","is_taker_fee_enabled","maker_fee","is_maker_fee_enabled","liquidation_fee","min_base_amount","min_quote_amount","order_quote_limit","supported_size_decimals","supported_price_decimals","supported_quote_decimals","created_at","multiplier","size_decimals","price_decimals","last_trade_price","daily_trades_count","daily_base_token_volume","daily_quote_token_volume","daily_price_low","daily_price_high","daily_price_change","daily_chart"]}}}}
```

## The SpotOrderBookDetail object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"SpotOrderBookDetail":{"type":"object","properties":{"symbol":{"type":"string"},"market_id":{"type":"integer","format":"int16"},"market_type":{"type":"string","enum":["perp","spot"]},"base_asset_id":{"type":"integer","format":"int16"},"quote_asset_id":{"type":"integer","format":"int16"},"status":{"type":"string","enum":["inactive","active"]},"taker_fee":{"type":"string"},"maker_fee":{"type":"string"},"liquidation_fee":{"type":"string"},"min_base_amount":{"type":"string"},"min_quote_amount":{"type":"string"},"order_quote_limit":{"type":"string"},"supported_size_decimals":{"type":"integer","format":"uint8"},"supported_price_decimals":{"type":"integer","format":"uint8"},"supported_quote_decimals":{"type":"integer","format":"uint8"},"size_decimals":{"type":"integer","format":"uint8"},"price_decimals":{"type":"integer","format":"uint8"},"last_trade_price":{"type":"number","format":"double"},"daily_trades_count":{"type":"integer","format":"int64"},"daily_base_token_volume":{"type":"number","format":"double"},"daily_quote_token_volume":{"type":"number","format":"double"},"daily_price_low":{"type":"number","format":"double"},"daily_price_high":{"type":"number","format":"double"},"daily_price_change":{"type":"number","format":"double"},"daily_chart":{"type":"object","additionalProperties":{"type":"number","format":"double"}},"is_maker_fee_enabled":{"type":"boolean"},"is_taker_fee_enabled":{"type":"boolean"},"created_at":{"type":"string"},"multiplier":{"type":"string"}},"title":"SpotOrderBookDetail","required":["symbol","market_id","market_type","base_asset_id","quote_asset_id","status","taker_fee","is_taker_fee_enabled","maker_fee","is_maker_fee_enabled","liquidation_fee","min_base_amount","min_quote_amount","order_quote_limit","supported_size_decimals","supported_price_decimals","supported_quote_decimals","created_at","multiplier","size_decimals","price_decimals","last_trade_price","daily_trades_count","daily_base_token_volume","daily_quote_token_volume","daily_price_low","daily_price_high","daily_price_change","daily_chart"]}}}}
```

## The OrderBookOrders object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"OrderBookOrders":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"total_asks":{"type":"integer","format":"int64"},"asks":{"type":"array","items":{"$ref":"#/components/schemas/SimpleOrder"}},"total_bids":{"type":"integer","format":"int64"},"bids":{"type":"array","items":{"$ref":"#/components/schemas/SimpleOrder"}}},"title":"OrderBookOrders","required":["code","total_asks","asks","total_bids","bids"]},"SimpleOrder":{"type":"object","properties":{"order_index":{"type":"integer","format":"int64"},"order_id":{"type":"string"},"owner_account_index":{"type":"integer","format":"int64"},"initial_base_amount":{"type":"string"},"remaining_base_amount":{"type":"string"},"price":{"type":"string"},"order_expiry":{"type":"integer","format":"int64"},"transaction_time":{"type":"integer","format":"int64"}},"title":"SimpleOrder","required":["order_index","order_id","owner_account_index","initial_base_amount","remaining_base_amount","price","order_expiry","transaction_time"]}}}}
```

## The OrderBookStats object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"OrderBookStats":{"type":"object","properties":{"symbol":{"type":"string"},"last_trade_price":{"type":"number","format":"double"},"daily_trades_count":{"type":"integer","format":"int64"},"daily_base_token_volume":{"type":"number","format":"double"},"daily_quote_token_volume":{"type":"number","format":"double"},"daily_price_change":{"type":"number","format":"double"}},"title":"OrderBookStats","required":["symbol","last_trade_price","daily_trades_count","daily_base_token_volume","daily_quote_token_volume","daily_price_change"]}}}}
```

## The OrderBooks object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"OrderBooks":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"order_books":{"type":"array","items":{"$ref":"#/components/schemas/OrderBook"}}},"title":"OrderBooks","required":["code","order_books"]},"OrderBook":{"type":"object","properties":{"symbol":{"type":"string"},"market_id":{"type":"integer","format":"int16"},"market_type":{"type":"string","enum":["perp","spot"]},"base_asset_id":{"type":"integer","format":"int16"},"quote_asset_id":{"type":"integer","format":"int16"},"status":{"type":"string","enum":["inactive","active"]},"taker_fee":{"type":"string"},"maker_fee":{"type":"string"},"liquidation_fee":{"type":"string"},"min_base_amount":{"type":"string"},"min_quote_amount":{"type":"string"},"supported_size_decimals":{"type":"integer","format":"uint8"},"supported_price_decimals":{"type":"integer","format":"uint8"},"supported_quote_decimals":{"type":"integer","format":"uint8"},"order_quote_limit":{"type":"string"},"is_maker_fee_enabled":{"type":"boolean"},"is_taker_fee_enabled":{"type":"boolean"},"created_at":{"type":"string"},"multiplier":{"type":"string"}},"title":"OrderBook","required":["symbol","market_id","market_type","base_asset_id","quote_asset_id","status","taker_fee","is_taker_fee_enabled","maker_fee","is_maker_fee_enabled","liquidation_fee","min_base_amount","min_quote_amount","order_quote_limit","supported_size_decimals","supported_price_decimals","supported_quote_decimals","created_at","multiplier"]}}}}
```

## The Orders object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"Orders":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"next_cursor":{"type":"string"},"orders":{"type":"array","items":{"$ref":"#/components/schemas/Order"}}},"title":"Orders","required":["code","orders"]},"Order":{"type":"object","properties":{"order_index":{"type":"integer","format":"int64"},"client_order_index":{"type":"integer","format":"int64"},"order_id":{"type":"string"},"client_order_id":{"type":"string"},"market_index":{"type":"integer","format":"int16"},"owner_account_index":{"type":"integer","format":"int64"},"initial_base_amount":{"type":"string"},"price":{"type":"string"},"nonce":{"type":"integer","format":"int64"},"remaining_base_amount":{"type":"string"},"is_ask":{"type":"boolean","format":"boolean"},"base_size":{"type":"integer","format":"int64"},"base_price":{"type":"integer","format":"int32"},"filled_base_amount":{"type":"string"},"filled_quote_amount":{"type":"string"},"side":{"type":"string","default":"buy","description":" TODO: remove this"},"type":{"type":"string","enum":["limit","market","stop-loss","stop-loss-limit","take-profit","take-profit-limit","twap","twap-sub","liquidation"]},"time_in_force":{"type":"string","enum":["good-till-time","immediate-or-cancel","post-only","Unknown"],"default":"good-till-time"},"reduce_only":{"type":"boolean","format":"boolean"},"trigger_price":{"type":"string"},"order_expiry":{"type":"integer","format":"int64"},"status":{"type":"string","enum":["in-progress","pending","open","filled","canceled","canceled-post-only","canceled-reduce-only","canceled-position-not-allowed","canceled-margin-not-allowed","canceled-too-much-slippage","canceled-not-enough-liquidity","canceled-self-trade","canceled-expired","canceled-oco","canceled-child","canceled-liquidation","canceled-invalid-balance"]},"trigger_status":{"type":"string","enum":["na","ready","mark-price","twap","parent-order"]},"trigger_time":{"type":"integer","format":"int64"},"parent_order_index":{"type":"integer","format":"int64"},"parent_order_id":{"type":"string"},"to_trigger_order_id_0":{"type":"string"},"to_trigger_order_id_1":{"type":"string"},"to_cancel_order_id_0":{"type":"string"},"block_height":{"type":"integer","format":"int64"},"timestamp":{"type":"integer","format":"int64"},"created_at":{"type":"integer","format":"int64"},"updated_at":{"type":"integer","format":"int64"},"transaction_time":{"type":"integer","format":"int64"},"integrator_fee_collector_index":{"type":"string"},"integrator_maker_fee":{"type":"string"},"integrator_taker_fee":{"type":"string"},"order_flags":{"type":"integer","format":"int64"},"order_version":{"type":"integer","format":"int64"}},"title":"Order","required":["order_index","client_order_index","order_id","client_order_id","market_index","owner_account_index","initial_base_amount","price","nonce","remaining_base_amount","is_ask","base_size","base_price","filled_base_amount","filled_quote_amount","side","type","time_in_force","reduce_only","trigger_price","order_expiry","status","trigger_status","trigger_time","parent_order_index","parent_order_id","to_trigger_order_id_0","to_trigger_order_id_1","to_cancel_order_id_0","integrator_fee_collector_index","integrator_taker_fee","integrator_maker_fee","order_flags","block_height","timestamp","created_at","updated_at","transaction_time","order_version"]}}}}
```

## The PnLEntry object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"PnLEntry":{"type":"object","properties":{"timestamp":{"type":"integer","format":"int64"},"trade_pnl":{"type":"number","format":"double"},"inflow":{"type":"number","format":"double"},"outflow":{"type":"number","format":"double"},"pool_pnl":{"type":"number","format":"double"},"pool_inflow":{"type":"number","format":"double"},"pool_outflow":{"type":"number","format":"double"},"pool_total_shares":{"type":"number","format":"double"},"spot_inflow":{"type":"number","format":"double"},"spot_outflow":{"type":"number","format":"double"},"staked_lit":{"type":"number","format":"double"},"staking_inflow":{"type":"number","format":"double"},"staking_outflow":{"type":"number","format":"double"},"staking_pnl":{"type":"number","format":"double"},"trade_spot_pnl":{"type":"number","format":"double"},"volume":{"type":"number","format":"double"}},"title":"PnLEntry","required":["timestamp","trade_pnl","inflow","outflow","pool_pnl","pool_inflow","pool_outflow","pool_total_shares","spot_inflow","spot_outflow","staked_lit","staking_inflow","staking_outflow","staking_pnl","trade_spot_pnl","volume"]}}}}
```

## The PositionFunding object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"PositionFunding":{"type":"object","properties":{"timestamp":{"type":"integer","format":"int64"},"market_id":{"type":"integer","format":"int16"},"funding_id":{"type":"integer","format":"int64"},"change":{"type":"string"},"discount":{"type":"string"},"rate":{"type":"string"},"position_size":{"type":"string"},"position_side":{"type":"string","enum":["long","short"]}},"title":"PositionFunding","required":["timestamp","market_id","funding_id","change","rate","position_size","position_side","discount"]}}}}
```

## The PositionFundings object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"PositionFundings":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"position_fundings":{"type":"array","items":{"$ref":"#/components/schemas/PositionFunding"}},"next_cursor":{"type":"string"}},"title":"PositionFundings","required":["code","position_fundings"]},"PositionFunding":{"type":"object","properties":{"timestamp":{"type":"integer","format":"int64"},"market_id":{"type":"integer","format":"int16"},"funding_id":{"type":"integer","format":"int64"},"change":{"type":"string"},"discount":{"type":"string"},"rate":{"type":"string"},"position_size":{"type":"string"},"position_side":{"type":"string","enum":["long","short"]}},"title":"PositionFunding","required":["timestamp","market_id","funding_id","change","rate","position_size","position_side","discount"]}}}}
```

## The PublicPoolInfo object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"PublicPoolInfo":{"type":"object","properties":{"status":{"type":"integer","format":"uint8"},"operator_fee":{"type":"string"},"min_operator_share_rate":{"type":"string"},"total_shares":{"type":"integer","format":"int64"},"operator_shares":{"type":"integer","format":"int64"},"annual_percentage_yield":{"type":"number","format":"double"},"daily_returns":{"type":"array","items":{"$ref":"#/components/schemas/DailyReturn"}},"share_prices":{"type":"array","items":{"$ref":"#/components/schemas/SharePrice"}},"sharpe_ratio":{"type":"number","format":"double"},"strategies":{"type":"array","items":{"$ref":"#/components/schemas/Strategy"}}},"title":"PublicPoolInfo","required":["status","operator_fee","min_operator_share_rate","total_shares","operator_shares","annual_percentage_yield","daily_returns","share_prices","sharpe_ratio","strategies"]},"DailyReturn":{"type":"object","properties":{"timestamp":{"type":"integer","format":"int64"},"daily_return":{"type":"number","format":"double"}},"title":"DailyReturn","required":["timestamp","daily_return"]},"SharePrice":{"type":"object","properties":{"timestamp":{"type":"integer","format":"int64"},"share_price":{"type":"number","format":"double"}},"title":"SharePrice","required":["timestamp","share_price"]},"Strategy":{"type":"object","properties":{"collateral":{"type":"string"}},"required":["collateral"]}}}}
```

## The PublicPoolMetadata object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"PublicPoolMetadata":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"account_index":{"type":"integer","format":"int64"},"account_type":{"type":"integer","format":"uint8"},"name":{"type":"string"},"l1_address":{"type":"string"},"annual_percentage_yield":{"type":"number","format":"double"},"status":{"type":"integer","format":"uint8"},"operator_fee":{"type":"string"},"total_asset_value":{"type":"string"},"total_shares":{"type":"integer","format":"int64"},"account_share":{"$ref":"#/components/schemas/PublicPoolShare"},"assets":{"type":"array","items":{"$ref":"#/components/schemas/AccountAsset"}},"created_at":{"type":"integer","format":"int64"},"master_account_index":{"type":"integer","format":"int64"},"sharpe_ratio":{"type":"number","format":"double"},"total_perps_value":{"type":"string"},"total_spot_value":{"type":"string"}},"title":"PublicPoolMetadata","required":["code","account_index","account_type","name","l1_address","annual_percentage_yield","status","operator_fee","total_asset_value","total_shares","assets","created_at","master_account_index","sharpe_ratio","total_perps_value","total_spot_value"]},"PublicPoolShare":{"type":"object","properties":{"public_pool_index":{"type":"integer","format":"int64"},"shares_amount":{"type":"integer","format":"int64"},"entry_usdc":{"type":"string"},"entry_timestamp":{"type":"integer","format":"int64"},"principal_amount":{"type":"string"}},"title":"PublicPoolShare","required":["public_pool_index","shares_amount","entry_usdc","entry_timestamp","principal_amount"]},"AccountAsset":{"type":"object","properties":{"symbol":{"type":"string"},"asset_id":{"type":"integer","format":"int16"},"balance":{"type":"string"},"locked_balance":{"type":"string"},"margin_balance":{"type":"string"},"margin_mode":{"type":"string","enum":["enabled","disabled"]},"multiplier":{"type":"string"}},"title":"AccountAsset","required":["symbol","asset_id","balance","locked_balance","margin_mode","margin_balance","multiplier"]}}}}
```

## The PublicPoolShare object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"PublicPoolShare":{"type":"object","properties":{"public_pool_index":{"type":"integer","format":"int64"},"shares_amount":{"type":"integer","format":"int64"},"entry_usdc":{"type":"string"},"entry_timestamp":{"type":"integer","format":"int64"},"principal_amount":{"type":"string"}},"title":"PublicPoolShare","required":["public_pool_index","shares_amount","entry_usdc","entry_timestamp","principal_amount"]}}}}
```

## The ReferralPointEntry object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"ReferralPointEntry":{"type":"object","properties":{"l1_address":{"type":"string"},"total_points":{"type":"number","format":"float"},"week_points":{"type":"number","format":"float"},"total_reward_points":{"type":"number","format":"float"},"week_reward_points":{"type":"number","format":"float"},"reward_point_multiplier":{"type":"string"}},"title":"ReferralPointEntry","required":["l1_address","total_points","week_points","total_reward_points","week_reward_points","reward_point_multiplier"]}}}}
```

## The ReferralPoints object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"ReferralPoints":{"type":"object","properties":{"referrals":{"type":"array","items":{"$ref":"#/components/schemas/ReferralPointEntry"}},"user_total_points":{"type":"number","format":"float"},"user_last_week_points":{"type":"number","format":"float"},"user_total_referral_reward_points":{"type":"number","format":"float"},"user_last_week_referral_reward_points":{"type":"number","format":"float"},"reward_point_multiplier":{"type":"string"}},"title":"ReferralPoints","required":["referrals","user_total_points","user_last_week_points","user_total_referral_reward_points","user_last_week_referral_reward_points","reward_point_multiplier"]},"ReferralPointEntry":{"type":"object","properties":{"l1_address":{"type":"string"},"total_points":{"type":"number","format":"float"},"week_points":{"type":"number","format":"float"},"total_reward_points":{"type":"number","format":"float"},"week_reward_points":{"type":"number","format":"float"},"reward_point_multiplier":{"type":"string"}},"title":"ReferralPointEntry","required":["l1_address","total_points","week_points","total_reward_points","week_reward_points","reward_point_multiplier"]}}}}
```

## The ReqAckNotif object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"ReqAckNotif":{"type":"object","properties":{"notif_id":{"type":"string"},"account_index":{"type":"integer","format":"int64"}},"title":"ReqAckNotif","required":["notif_id","account_index"]}}}}
```

## The ReqChangeAccountTier object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"ReqChangeAccountTier":{"type":"object","properties":{"account_index":{"type":"integer","format":"int64"},"new_tier":{"type":"string"}},"title":"ReqChangeAccountTier","required":["account_index","new_tier"]}}}}
```

## The RespGetMakerOnlyApiKeys object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"RespGetMakerOnlyApiKeys":{"type":"object","title":"RespGetMakerOnlyApiKeys","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"api_key_indexes":{"type":"array","items":{"type":"integer","format":"int64"}}},"required":["code","api_key_indexes"]}}}}
```

## The ReqSetMakerOnlyApiKeys object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"ReqSetMakerOnlyApiKeys":{"type":"object","title":"ReqSetMakerOnlyApiKeys","description":"Send as form data, not JSON. The value replaces the full maker-only API key list; use [] to clear all restrictions.","properties":{"account_index":{"type":"integer","format":"int64"},"api_key_indexes":{"type":"string","description":"JSON array string of API key indexes, e.g. \"[4,5]\". Use [] to clear all maker-only restrictions."}},"required":["account_index","api_key_indexes"]}}}}
```

## The RespSetMakerOnlyApiKeys object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"RespSetMakerOnlyApiKeys":{"type":"object","title":"RespSetMakerOnlyApiKeys","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"}},"required":["code"]}}}}
```

## The ReqSendTx object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"ReqSendTx":{"type":"object","properties":{"tx_type":{"type":"integer","format":"uint8"},"tx_info":{"type":"string"},"price_protection":{"type":"boolean","format":"boolean","default":"true"}},"title":"ReqSendTx","required":["tx_type","tx_info"]}}}}
```

## The ReqSendTxBatch object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"ReqSendTxBatch":{"type":"object","properties":{"tx_types":{"type":"string"},"tx_infos":{"type":"string"}},"title":"ReqSendTxBatch","required":["tx_types","tx_infos"]}}}}
```

## The RespChangeAccountTier object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"RespChangeAccountTier":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"}},"title":"RespChangeAccountTier","required":["code"]}}}}
```

## The RespGetFastBridgeInfo object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"RespGetFastBridgeInfo":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"fast_bridge_limit":{"type":"string"}},"title":"RespGetFastBridgeInfo","required":["code","fast_bridge_limit"]}}}}
```

## The RespPublicPoolsMetadata object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"RespPublicPoolsMetadata":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"public_pools":{"type":"array","items":{"$ref":"#/components/schemas/PublicPoolMetadata"}}},"title":"RespPublicPoolsMetadata","required":["code","public_pools"]},"PublicPoolMetadata":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"account_index":{"type":"integer","format":"int64"},"account_type":{"type":"integer","format":"uint8"},"name":{"type":"string"},"l1_address":{"type":"string"},"annual_percentage_yield":{"type":"number","format":"double"},"status":{"type":"integer","format":"uint8"},"operator_fee":{"type":"string"},"total_asset_value":{"type":"string"},"total_shares":{"type":"integer","format":"int64"},"account_share":{"$ref":"#/components/schemas/PublicPoolShare"},"assets":{"type":"array","items":{"$ref":"#/components/schemas/AccountAsset"}},"created_at":{"type":"integer","format":"int64"},"master_account_index":{"type":"integer","format":"int64"},"sharpe_ratio":{"type":"number","format":"double"},"total_perps_value":{"type":"string"},"total_spot_value":{"type":"string"}},"title":"PublicPoolMetadata","required":["code","account_index","account_type","name","l1_address","annual_percentage_yield","status","operator_fee","total_asset_value","total_shares","assets","created_at","master_account_index","sharpe_ratio","total_perps_value","total_spot_value"]},"PublicPoolShare":{"type":"object","properties":{"public_pool_index":{"type":"integer","format":"int64"},"shares_amount":{"type":"integer","format":"int64"},"entry_usdc":{"type":"string"},"entry_timestamp":{"type":"integer","format":"int64"},"principal_amount":{"type":"string"}},"title":"PublicPoolShare","required":["public_pool_index","shares_amount","entry_usdc","entry_timestamp","principal_amount"]},"AccountAsset":{"type":"object","properties":{"symbol":{"type":"string"},"asset_id":{"type":"integer","format":"int16"},"balance":{"type":"string"},"locked_balance":{"type":"string"},"margin_balance":{"type":"string"},"margin_mode":{"type":"string","enum":["enabled","disabled"]},"multiplier":{"type":"string"}},"title":"AccountAsset","required":["symbol","asset_id","balance","locked_balance","margin_mode","margin_balance","multiplier"]}}}}
```

## The RespSendTx object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"RespSendTx":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"tx_hash":{"type":"string"},"predicted_execution_time_ms":{"type":"integer","format":"int64"},"volume_quota_remaining":{"type":"integer","format":"int64"}},"title":"RespSendTx","required":["code","tx_hash","predicted_execution_time_ms","volume_quota_remaining"]}}}}
```

## The RespSendTxBatch object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"RespSendTxBatch":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"tx_hash":{"type":"array","items":{"type":"string"}},"predicted_execution_time_ms":{"type":"integer","format":"int64"},"volume_quota_remaining":{"type":"integer","format":"int64"}},"title":"RespSendTxBatch","required":["code","tx_hash","predicted_execution_time_ms","volume_quota_remaining"]}}}}
```

## The RespWithdrawalDelay object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"RespWithdrawalDelay":{"type":"object","properties":{"seconds":{"type":"integer","format":"int64"}},"title":"RespWithdrawalDelay","required":["seconds"]}}}}
```

## The ResultCode object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"ResultCode":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"}},"title":"ResultCode","required":["code"]}}}}
```

## The RiskInfo object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"RiskInfo":{"type":"object","properties":{"cross_risk_parameters":{"$ref":"#/components/schemas/RiskParameters"},"isolated_risk_parameters":{"type":"array","items":{"$ref":"#/components/schemas/RiskParameters"}}},"title":"RiskInfo","required":["cross_risk_parameters","isolated_risk_parameters"]},"RiskParameters":{"type":"object","properties":{"market_id":{"type":"integer","format":"int16"},"collateral":{"type":"string"},"total_account_value":{"type":"string"},"initial_margin_req":{"type":"string"},"maintenance_margin_req":{"type":"string"},"close_out_margin_req":{"type":"string"},"total_account_liquidation_threshold":{"type":"string"},"usdc_collateral_with_funding":{"type":"string"},"usdc_portfolio_value":{"type":"string"},"total_portfolio_value":{"type":"string"}},"title":"RiskParameters","required":["market_id","total_account_value","initial_margin_req","maintenance_margin_req","close_out_margin_req","total_account_liquidation_threshold","collateral","usdc_collateral_with_funding","usdc_portfolio_value","total_portfolio_value"]}}}}
```

## The RiskParameters object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"RiskParameters":{"type":"object","properties":{"market_id":{"type":"integer","format":"int16"},"collateral":{"type":"string"},"total_account_value":{"type":"string"},"initial_margin_req":{"type":"string"},"maintenance_margin_req":{"type":"string"},"close_out_margin_req":{"type":"string"},"total_account_liquidation_threshold":{"type":"string"},"usdc_collateral_with_funding":{"type":"string"},"usdc_portfolio_value":{"type":"string"},"total_portfolio_value":{"type":"string"}},"title":"RiskParameters","required":["market_id","total_account_value","initial_margin_req","maintenance_margin_req","close_out_margin_req","total_account_liquidation_threshold","collateral","usdc_collateral_with_funding","usdc_portfolio_value","total_portfolio_value"]}}}}
```

## The SharePrice object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"SharePrice":{"type":"object","properties":{"timestamp":{"type":"integer","format":"int64"},"share_price":{"type":"number","format":"double"}},"title":"SharePrice","required":["timestamp","share_price"]}}}}
```

## The SimpleOrder object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"SimpleOrder":{"type":"object","properties":{"order_index":{"type":"integer","format":"int64"},"order_id":{"type":"string"},"owner_account_index":{"type":"integer","format":"int64"},"initial_base_amount":{"type":"string"},"remaining_base_amount":{"type":"string"},"price":{"type":"string"},"order_expiry":{"type":"integer","format":"int64"},"transaction_time":{"type":"integer","format":"int64"}},"title":"SimpleOrder","required":["order_index","order_id","owner_account_index","initial_base_amount","remaining_base_amount","price","order_expiry","transaction_time"]}}}}
```

## The Status object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"Status":{"type":"object","properties":{"status":{"type":"integer","format":"int32"},"network_id":{"type":"integer","format":"int32"},"timestamp":{"type":"integer","format":"int64"}},"title":"Status","required":["status","network_id","timestamp"]}}}}
```

## The SubAccountMetadata object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"SubAccountMetadata":{"type":"object","properties":{"color":{"type":"string"}},"title":"SubAccountMetadata","required":["color"]}}}}
```

## The SubAccounts object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"SubAccounts":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"l1_address":{"type":"string"},"sub_accounts":{"type":"array","items":{"$ref":"#/components/schemas/Account"}},"next_cursor":{"type":"string"}},"title":"SubAccounts","required":["code","l1_address","sub_accounts"]},"Account":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"account_type":{"type":"integer","format":"uint8"},"account_trading_mode":{"type":"integer","format":"uint8","description":"Classic=0 and Unified=1"},"index":{"type":"integer","format":"int64"},"l1_address":{"type":"string"},"cancel_all_time":{"type":"integer","format":"int64"},"total_order_count":{"type":"integer","format":"int64"},"total_isolated_order_count":{"type":"integer","format":"int64"},"pending_order_count":{"type":"integer","format":"int64"},"available_balance":{"type":"string"},"status":{"type":"integer","format":"uint8"},"collateral":{"type":"string"},"transaction_time":{"type":"integer","format":"int64"}},"title":"Account","required":["code","account_type","index","l1_address","cancel_all_time","total_order_count","total_isolated_order_count","pending_order_count","available_balance","status","collateral","account_trading_mode","transaction_time"]}}}}
```

## The Trade object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"Trade":{"type":"object","properties":{"trade_id":{"type":"integer","format":"int64"},"tx_hash":{"type":"string"},"type":{"type":"string","enum":["trade","liquidation","deleverage","market-settlement"]},"market_id":{"type":"integer","format":"int16"},"size":{"type":"string"},"price":{"type":"string"},"usd_amount":{"type":"string"},"ask_id":{"type":"integer","format":"int64"},"bid_id":{"type":"integer","format":"int64"},"ask_account_id":{"type":"integer","format":"int64"},"bid_account_id":{"type":"integer","format":"int64"},"is_maker_ask":{"type":"boolean","format":"boolean"},"block_height":{"type":"integer","format":"int64"},"timestamp":{"type":"integer","format":"int64"},"taker_fee":{"type":"integer","format":"int32"},"taker_position_size_before":{"type":"string"},"taker_entry_quote_before":{"type":"string"},"taker_initial_margin_fraction_before":{"type":"integer","format":"uin16"},"taker_position_sign_changed":{"type":"boolean","format":"boolean"},"maker_fee":{"type":"integer","format":"int32"},"maker_position_size_before":{"type":"string"},"maker_entry_quote_before":{"type":"string"},"maker_initial_margin_fraction_before":{"type":"integer","format":"uin16"},"maker_position_sign_changed":{"type":"boolean","format":"boolean"},"transaction_time":{"type":"integer","format":"int64"},"bid_account_pnl":{"type":"string","description":"Realized PnL for the queried account index, triggered by reducing a short position"},"ask_account_pnl":{"type":"string","description":"Realized PnL for the queried account index, triggered by reducing a long position, or a spot position"},"ask_client_id":{"type":"integer","format":"int64"},"bid_client_id":{"type":"integer","format":"int64"},"ask_client_id_str":{"type":"string"},"bid_client_id_str":{"type":"string"},"ask_id_str":{"type":"string"},"bid_id_str":{"type":"string"},"trade_id_str":{"type":"string"},"integrator_maker_fee":{"type":"integer","format":"int32"},"integrator_maker_fee_collector_index":{"type":"integer","format":"int64"},"integrator_taker_fee":{"type":"integer","format":"int32"},"integrator_taker_fee_collector_index":{"type":"integer","format":"int64"},"taker_allocated_margin_usdc_before":{"type":"integer","format":"int64"},"taker_allocated_margin_usdc_after":{"type":"integer","format":"int64"},"maker_allocated_margin_usdc_before":{"type":"integer","format":"int64"},"maker_allocated_margin_usdc_after":{"type":"integer","format":"int64"},"bid_order_version":{"type":"integer","format":"int64"},"ask_order_version":{"type":"integer","format":"int64"}},"title":"Trade","required":["trade_id","trade_id_str","tx_hash","type","market_id","size","price","usd_amount","ask_id","bid_id","ask_client_id","ask_client_id_str","bid_client_id","bid_client_id_str","ask_account_id","bid_account_id","is_maker_ask","block_height","timestamp","taker_position_size_before","taker_entry_quote_before","taker_initial_margin_fraction_before","taker_position_sign_changed","maker_position_size_before","maker_entry_quote_before","maker_initial_margin_fraction_before","maker_position_sign_changed","transaction_time","ask_account_pnl","bid_account_pnl","integrator_taker_fee","integrator_taker_fee_collector_index","integrator_maker_fee","integrator_maker_fee_collector_index","taker_allocated_margin_usdc_before","taker_allocated_margin_usdc_after","maker_allocated_margin_usdc_before","maker_allocated_margin_usdc_after","ask_order_version","bid_order_version"]}}}}
```

## The Trades object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"Trades":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"next_cursor":{"type":"string"},"trades":{"type":"array","items":{"$ref":"#/components/schemas/Trade"}}},"title":"Trades","required":["code","trades"]},"Trade":{"type":"object","properties":{"trade_id":{"type":"integer","format":"int64"},"tx_hash":{"type":"string"},"type":{"type":"string","enum":["trade","liquidation","deleverage","market-settlement"]},"market_id":{"type":"integer","format":"int16"},"size":{"type":"string"},"price":{"type":"string"},"usd_amount":{"type":"string"},"ask_id":{"type":"integer","format":"int64"},"bid_id":{"type":"integer","format":"int64"},"ask_account_id":{"type":"integer","format":"int64"},"bid_account_id":{"type":"integer","format":"int64"},"is_maker_ask":{"type":"boolean","format":"boolean"},"block_height":{"type":"integer","format":"int64"},"timestamp":{"type":"integer","format":"int64"},"taker_fee":{"type":"integer","format":"int32"},"taker_position_size_before":{"type":"string"},"taker_entry_quote_before":{"type":"string"},"taker_initial_margin_fraction_before":{"type":"integer","format":"uin16"},"taker_position_sign_changed":{"type":"boolean","format":"boolean"},"maker_fee":{"type":"integer","format":"int32"},"maker_position_size_before":{"type":"string"},"maker_entry_quote_before":{"type":"string"},"maker_initial_margin_fraction_before":{"type":"integer","format":"uin16"},"maker_position_sign_changed":{"type":"boolean","format":"boolean"},"transaction_time":{"type":"integer","format":"int64"},"bid_account_pnl":{"type":"string","description":"Realized PnL for the queried account index, triggered by reducing a short position"},"ask_account_pnl":{"type":"string","description":"Realized PnL for the queried account index, triggered by reducing a long position, or a spot position"},"ask_client_id":{"type":"integer","format":"int64"},"bid_client_id":{"type":"integer","format":"int64"},"ask_client_id_str":{"type":"string"},"bid_client_id_str":{"type":"string"},"ask_id_str":{"type":"string"},"bid_id_str":{"type":"string"},"trade_id_str":{"type":"string"},"integrator_maker_fee":{"type":"integer","format":"int32"},"integrator_maker_fee_collector_index":{"type":"integer","format":"int64"},"integrator_taker_fee":{"type":"integer","format":"int32"},"integrator_taker_fee_collector_index":{"type":"integer","format":"int64"},"taker_allocated_margin_usdc_before":{"type":"integer","format":"int64"},"taker_allocated_margin_usdc_after":{"type":"integer","format":"int64"},"maker_allocated_margin_usdc_before":{"type":"integer","format":"int64"},"maker_allocated_margin_usdc_after":{"type":"integer","format":"int64"},"bid_order_version":{"type":"integer","format":"int64"},"ask_order_version":{"type":"integer","format":"int64"}},"title":"Trade","required":["trade_id","trade_id_str","tx_hash","type","market_id","size","price","usd_amount","ask_id","bid_id","ask_client_id","ask_client_id_str","bid_client_id","bid_client_id_str","ask_account_id","bid_account_id","is_maker_ask","block_height","timestamp","taker_position_size_before","taker_entry_quote_before","taker_initial_margin_fraction_before","taker_position_sign_changed","maker_position_size_before","maker_entry_quote_before","maker_initial_margin_fraction_before","maker_position_sign_changed","transaction_time","ask_account_pnl","bid_account_pnl","integrator_taker_fee","integrator_taker_fee_collector_index","integrator_maker_fee","integrator_maker_fee_collector_index","taker_allocated_margin_usdc_before","taker_allocated_margin_usdc_after","maker_allocated_margin_usdc_before","maker_allocated_margin_usdc_after","ask_order_version","bid_order_version"]}}}}
```

## The TransferFeeInfo object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"TransferFeeInfo":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"transfer_fee_usdc":{"type":"integer","format":"int64"}},"title":"TransferFeeInfo","required":["code","transfer_fee_usdc"]}}}}
```

## The TransferHistory object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"TransferHistory":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"transfers":{"type":"array","items":{"$ref":"#/components/schemas/TransferHistoryItem"}},"cursor":{"type":"string"}},"title":"TransferHistory","required":["code","transfers","cursor"]},"TransferHistoryItem":{"type":"object","properties":{"id":{"type":"string"},"amount":{"type":"string"},"timestamp":{"type":"integer","format":"int64"},"type":{"type":"string","enum":["L2TransferInflow","L2TransferOutflow","L2BurnSharesInflow","L2BurnSharesOutflow","L2MintSharesInflow","L2MintSharesOutflow","L2SelfTransfer","L2StakeAssetInflow","L2StakeAssetOutflow","L2UnstakeAssetInflow","L2UnstakeAssetOutflow","L2ForceBurnSharesInflow","L2ForceBurnSharesOutflow","L1BurnSharesInflow","L1BurnSharesOutflow","L1UnstakeAssetInflow","L1UnstakeAssetOutflow","L2CreatePublicPoolInflow","L2CreatePublicPoolOutflow","L2CreateStakingPoolInflow","L2CreateStakingPoolOutflow"]},"from_l1_address":{"type":"string"},"to_l1_address":{"type":"string"},"from_account_index":{"type":"integer","format":"int64"},"to_account_index":{"type":"integer","format":"int64"},"tx_hash":{"type":"string"},"asset_id":{"type":"integer","format":"int16"},"fee":{"type":"string"},"from_route":{"type":"string","enum":["spot","perps"]},"to_route":{"type":"string","enum":["spot","perps"]}},"title":"TransferHistoryItem","required":["id","amount","timestamp","type","from_l1_address","to_l1_address","from_account_index","to_account_index","tx_hash","asset_id","fee","from_route","to_route"]}}}}
```

## The TransferHistoryItem object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"TransferHistoryItem":{"type":"object","properties":{"id":{"type":"string"},"amount":{"type":"string"},"timestamp":{"type":"integer","format":"int64"},"type":{"type":"string","enum":["L2TransferInflow","L2TransferOutflow","L2BurnSharesInflow","L2BurnSharesOutflow","L2MintSharesInflow","L2MintSharesOutflow","L2SelfTransfer","L2StakeAssetInflow","L2StakeAssetOutflow","L2UnstakeAssetInflow","L2UnstakeAssetOutflow","L2ForceBurnSharesInflow","L2ForceBurnSharesOutflow","L1BurnSharesInflow","L1BurnSharesOutflow","L1UnstakeAssetInflow","L1UnstakeAssetOutflow","L2CreatePublicPoolInflow","L2CreatePublicPoolOutflow","L2CreateStakingPoolInflow","L2CreateStakingPoolOutflow"]},"from_l1_address":{"type":"string"},"to_l1_address":{"type":"string"},"from_account_index":{"type":"integer","format":"int64"},"to_account_index":{"type":"integer","format":"int64"},"tx_hash":{"type":"string"},"asset_id":{"type":"integer","format":"int16"},"fee":{"type":"string"},"from_route":{"type":"string","enum":["spot","perps"]},"to_route":{"type":"string","enum":["spot","perps"]}},"title":"TransferHistoryItem","required":["id","amount","timestamp","type","from_l1_address","to_l1_address","from_account_index","to_account_index","tx_hash","asset_id","fee","from_route","to_route"]}}}}
```

## The TxHash object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"TxHash":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"tx_hash":{"type":"string"}},"title":"TxHash","required":["code","tx_hash"]}}}}
```

## The ValidatorInfo object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"ValidatorInfo":{"type":"object","properties":{"address":{"type":"string"},"is_active":{"type":"boolean","format":"boolean"}},"title":"ValidatorInfo","required":["address","is_active"]}}}}
```

## The WithdrawHistory object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"WithdrawHistory":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"withdraws":{"type":"array","items":{"$ref":"#/components/schemas/WithdrawHistoryItem"}},"cursor":{"type":"string"}},"title":"WithdrawHistory","required":["code","withdraws","cursor"]},"WithdrawHistoryItem":{"type":"object","properties":{"id":{"type":"string"},"amount":{"type":"string"},"timestamp":{"type":"integer","format":"int64"},"status":{"type":"string","enum":["failed","pending","claimable","refunded","completed"]},"type":{"type":"string","enum":["secure","fast"]},"l1_tx_hash":{"type":"string"},"asset_id":{"type":"integer","format":"int16"}},"title":"WithdrawHistoryItem","required":["id","amount","timestamp","status","type","l1_tx_hash","asset_id"]}}}}
```

## The WithdrawHistoryItem object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"WithdrawHistoryItem":{"type":"object","properties":{"id":{"type":"string"},"amount":{"type":"string"},"timestamp":{"type":"integer","format":"int64"},"status":{"type":"string","enum":["failed","pending","claimable","refunded","completed"]},"type":{"type":"string","enum":["secure","fast"]},"l1_tx_hash":{"type":"string"},"asset_id":{"type":"integer","format":"int16"}},"title":"WithdrawHistoryItem","required":["id","amount","timestamp","status","type","l1_tx_hash","asset_id"]}}}}
```

## The ZkLighterInfo object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"ZkLighterInfo":{"type":"object","properties":{"contract_address":{"type":"string"}},"title":"ZkLighterInfo","required":["contract_address"]}}}}
```

## The ReqFastwithdraw object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"ReqFastwithdraw":{"type":"object","properties":{"tx_info":{"type":"string"},"to_address":{"type":"string"}},"title":"ReqFastwithdraw","required":["tx_info","to_address"]}}}}
```

## The ReqPostApiToken object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"ReqPostApiToken":{"type":"object","properties":{"name":{"type":"string"},"account_index":{"type":"integer","format":"int64"},"expiry":{"type":"integer","format":"int64"},"sub_account_access":{"type":"boolean","format":"boolean"},"scopes":{"type":"string","default":"read.*"}},"title":"ReqPostApiToken","required":["name","account_index","expiry","sub_account_access"]}}}}
```

## The ReqRevokeApiToken object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"ReqRevokeApiToken":{"type":"object","properties":{"token_id":{"type":"integer","format":"int64"},"account_index":{"type":"integer","format":"int64"}},"title":"ReqRevokeApiToken","required":["token_id","account_index"]}}}}
```

## The RespGetApiTokens object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"RespGetApiTokens":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"api_tokens":{"type":"array","items":{"$ref":"#/components/schemas/ApiToken"}}},"title":"RespGetApiTokens","required":["code","api_tokens"]},"ApiToken":{"type":"object","properties":{"token_id":{"type":"integer","format":"int64"},"api_token":{"type":"string"},"name":{"type":"string"},"account_index":{"type":"integer","format":"int64"},"expiry":{"type":"integer","format":"int64"},"sub_account_access":{"type":"boolean","format":"boolean"},"revoked":{"type":"boolean","format":"boolean"},"scopes":{"type":"string"}},"title":"ApiToken","required":["token_id","api_token","name","account_index","expiry","sub_account_access","revoked","scopes"]}}}}
```

## The RespGetFastwithdrawalInfo object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"RespGetFastwithdrawalInfo":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"to_account_index":{"type":"integer","format":"int64"},"withdraw_limit":{"type":"string"},"max_withdrawal_amount":{"type":"string"}},"title":"RespGetFastwithdrawalInfo","required":["code","to_account_index","withdraw_limit","max_withdrawal_amount"]}}}}
```

## The RespPostApiToken object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"RespPostApiToken":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"token_id":{"type":"integer","format":"int64"},"api_token":{"type":"string"},"name":{"type":"string"},"account_index":{"type":"integer","format":"int64"},"expiry":{"type":"integer","format":"int64"},"sub_account_access":{"type":"boolean","format":"boolean"},"revoked":{"type":"boolean","format":"boolean"},"scopes":{"type":"string"}},"title":"RespPostApiToken","required":["code","token_id","api_token","name","account_index","expiry","sub_account_access","revoked","scopes"]}}}}
```

## The RespRevokeApiToken object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"RespRevokeApiToken":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"token_id":{"type":"integer","format":"int64"},"revoked":{"type":"boolean","format":"boolean"}},"title":"RespRevokeApiToken","required":["code","token_id","revoked"]}}}}
```

## The ApiToken object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"ApiToken":{"type":"object","properties":{"token_id":{"type":"integer","format":"int64"},"api_token":{"type":"string"},"name":{"type":"string"},"account_index":{"type":"integer","format":"int64"},"expiry":{"type":"integer","format":"int64"},"sub_account_access":{"type":"boolean","format":"boolean"},"revoked":{"type":"boolean","format":"boolean"},"scopes":{"type":"string"}},"title":"ApiToken","required":["token_id","api_token","name","account_index","expiry","sub_account_access","revoked","scopes"]}}}}
```

## The ReqUpdateReferralCode object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"ReqUpdateReferralCode":{"type":"object","properties":{"account_index":{"type":"integer","format":"int64"},"new_referral_code":{"type":"string"}},"title":"ReqUpdateReferralCode","required":["account_index","new_referral_code"]}}}}
```

## The RespUpdateReferralCode object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"RespUpdateReferralCode":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"success":{"type":"boolean","format":"boolean"}},"title":"RespUpdateReferralCode","required":["code","success"]}}}}
```

## The CreateIntentAddressResp object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"CreateIntentAddressResp":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"intent_address":{"type":"string"}},"title":"CreateIntentAddressResp","required":["code","intent_address"]}}}}
```

## The ReqUseReferralCode object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"ReqUseReferralCode":{"type":"object","properties":{"l1_address":{"type":"string"},"referral_code":{"type":"string"},"discord":{"type":"string"},"telegram":{"type":"string"},"x":{"type":"string"},"signature":{"type":"string"},"source":{"type":"string"}},"title":"ReqUseReferralCode","required":["l1_address","referral_code"]}}}}
```

## The ReqCreateIntentAddress object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"ReqCreateIntentAddress":{"type":"object","properties":{"chain_id":{"type":"string"},"from_addr":{"type":"string"},"amount":{"type":"string"},"is_external_deposit":{"type":"boolean","format":"boolean"}},"title":"ReqCreateIntentAddress","required":["chain_id","from_addr","amount"]}}}}
```

## The BridgeSupportedNetworks object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"BridgeSupportedNetworks":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"networks":{"type":"array","items":{"$ref":"#/components/schemas/BridgeSupportedNetwork"}}},"title":"BridgeSupportedNetworks","required":["code","networks"]},"BridgeSupportedNetwork":{"type":"object","properties":{"name":{"type":"string"},"chain_id":{"type":"string"},"explorer":{"type":"string"}},"title":"BridgeSupportedNetwork","required":["name","chain_id","explorer"]}}}}
```

## The ReferralCode object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"ReferralCode":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"referral_code":{"type":"string"}},"title":"ReferralCode","required":["code","referral_code"]}}}}
```

## The ReqCreateReferralCode object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"ReqCreateReferralCode":{"type":"object","properties":{"account_index":{"type":"integer","format":"int64"}},"title":"ReqCreateReferralCode","required":["account_index"]}}}}
```

## The ReqUpdateKickback object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"ReqUpdateKickback":{"type":"object","properties":{"account_index":{"type":"integer","format":"int64"},"kickback_percentage":{"type":"number","format":"double","maximum":100}},"title":"ReqUpdateKickback","required":["account_index","kickback_percentage"]}}}}
```

## The Deposit object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"Deposit":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"source":{"type":"string"},"source_chain_id":{"type":"string"},"fast_bridge_tx_hash":{"type":"string"},"batch_claim_tx_hash":{"type":"string"},"cctp_burn_tx_hash":{"type":"string"},"amount":{"type":"string"},"intent_address":{"type":"string"},"status":{"type":"string"},"step":{"type":"string"},"description":{"type":"string"},"created_at":{"type":"integer","format":"int64"},"updated_at":{"type":"integer","format":"int64"},"is_external_deposit":{"type":"boolean","format":"boolean"},"is_next_bridge_fast":{"type":"boolean","format":"boolean"}},"title":"Deposit","required":["code","source","source_chain_id","fast_bridge_tx_hash","batch_claim_tx_hash","cctp_burn_tx_hash","amount","intent_address","status","step","description","created_at","updated_at","is_external_deposit","is_next_bridge_fast"]}}}}
```

## The RespUpdateKickback object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"RespUpdateKickback":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"success":{"type":"boolean","format":"boolean"}},"title":"RespUpdateKickback","required":["code","success"]}}}}
```

## The Layer1BasicInfo object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"Layer1BasicInfo":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"l1_providers":{"type":"array","items":{"$ref":"#/components/schemas/L1ProviderInfo"}},"l1_providers_health":{"type":"boolean","format":"boolean"},"validator_info":{"type":"array","items":{"$ref":"#/components/schemas/ValidatorInfo"}},"contract_addresses":{"type":"array","items":{"$ref":"#/components/schemas/ContractAddress"}},"latest_l1_generic_block":{"type":"integer","format":"int64"},"latest_l1_governance_block":{"type":"integer","format":"int64"},"latest_l1_desert_block":{"type":"integer","format":"int64"}},"title":"Layer1BasicInfo","required":["code","l1_providers","l1_providers_health","validator_info","contract_addresses","latest_l1_generic_block","latest_l1_governance_block","latest_l1_desert_block"]},"L1ProviderInfo":{"type":"object","properties":{"chainId":{"type":"integer","format":"int64"},"networkId":{"type":"integer","format":"int64"},"latestBlockNumber":{"type":"integer","format":"int64"}},"title":"L1ProviderInfo","required":["chainId","networkId","latestBlockNumber"]},"ValidatorInfo":{"type":"object","properties":{"address":{"type":"string"},"is_active":{"type":"boolean","format":"boolean"}},"title":"ValidatorInfo","required":["address","is_active"]},"ContractAddress":{"type":"object","properties":{"name":{"type":"string"},"address":{"type":"string"}},"title":"ContractAddress","required":["name","address"]}}}}
```

## The RespGetExchangeMetrics object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"RespGetExchangeMetrics":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"metrics":{"type":"array","items":{"$ref":"#/components/schemas/ExchangeMetric"}}},"title":"RespGetExchangeMetrics","required":["code","metrics"]},"ExchangeMetric":{"type":"object","properties":{"timestamp":{"type":"integer","format":"int64"},"data":{"type":"number","format":"double"}},"title":"ExchangeMetric","required":["timestamp","data"]}}}}
```

## The ExchangeMetric object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"ExchangeMetric":{"type":"object","properties":{"timestamp":{"type":"integer","format":"int64"},"data":{"type":"number","format":"double"}},"title":"ExchangeMetric","required":["timestamp","data"]}}}}
```

## The ExecuteStat object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"ExecuteStat":{"type":"object","properties":{"timestamp":{"type":"integer","format":"int64"},"slippage":{"type":"array","items":{"$ref":"#/components/schemas/SlippageResult"}}},"required":["timestamp","slippage"]},"SlippageResult":{"type":"object","properties":{"exchange":{"type":"string"},"market":{"type":"string"},"size_usd":{"type":"integer","format":"int64"},"avg_slippage":{"type":"number","format":"double"},"data_count":{"type":"integer","format":"int64"}},"title":"SlippageResult","required":["exchange","market","size_usd","avg_slippage","data_count"]}}}}
```

## The SlippageResult object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"SlippageResult":{"type":"object","properties":{"exchange":{"type":"string"},"market":{"type":"string"},"size_usd":{"type":"integer","format":"int64"},"avg_slippage":{"type":"number","format":"double"},"data_count":{"type":"integer","format":"int64"}},"title":"SlippageResult","required":["exchange","market","size_usd","avg_slippage","data_count"]}}}}
```

## The RespGetExecuteStats object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"RespGetExecuteStats":{"type":"object","properties":{"period":{"type":"string","enum":["d","w","m","q","y","all"]},"result":{"type":"array","items":{"$ref":"#/components/schemas/ExecuteStat"}}},"required":["period","result"]},"ExecuteStat":{"type":"object","properties":{"timestamp":{"type":"integer","format":"int64"},"slippage":{"type":"array","items":{"$ref":"#/components/schemas/SlippageResult"}}},"required":["timestamp","slippage"]},"SlippageResult":{"type":"object","properties":{"exchange":{"type":"string"},"market":{"type":"string"},"size_usd":{"type":"integer","format":"int64"},"avg_slippage":{"type":"number","format":"double"},"data_count":{"type":"integer","format":"int64"}},"title":"SlippageResult","required":["exchange","market","size_usd","avg_slippage","data_count"]}}}}
```

## The LeaseOptionEntry object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"LeaseOptionEntry":{"type":"object","properties":{"duration_days":{"type":"integer","description":"Lease duration in days","format":"int32"},"annual_rate":{"type":"number","format":"double","description":"Annual rate as a percentage (e.g. 25.0 means 25%)"}},"required":["duration_days","annual_rate"]}}}}
```

## The RespGetLeaseOptions object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"RespGetLeaseOptions":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"options":{"type":"array","items":{"$ref":"#/components/schemas/LeaseOptionEntry"}},"lit_incentives_account_index":{"type":"integer","format":"int64","description":"Account index that receives the leasing fee"}},"required":["code","options","lit_incentives_account_index"]},"LeaseOptionEntry":{"type":"object","properties":{"duration_days":{"type":"integer","description":"Lease duration in days","format":"int32"},"annual_rate":{"type":"number","format":"double","description":"Annual rate as a percentage (e.g. 25.0 means 25%)"}},"required":["duration_days","annual_rate"]}}}}
```

## The LeaseEntry object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"LeaseEntry":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Lease ID"},"master_account_index":{"type":"integer","format":"int64","description":"Master account index"},"lease_amount":{"type":"integer","format":"int64","description":"Leased LIT amount in raw units (1 LIT = 1e8)"},"fee_amount":{"type":"integer","format":"int64","description":"Fee paid in raw units"},"start":{"type":"integer","format":"int64","description":"Lease start time (Unix milliseconds)"},"end":{"type":"integer","format":"int64","description":"Lease end time (Unix milliseconds)"},"status":{"type":"string","enum":["waiting_fee","leased","expired","canceled"],"description":"Lease status"},"error":{"type":"string","description":"Error message if lease was canceled"}},"required":["end","error","fee_amount","id","lease_amount","master_account_index","start","status"]}}}}
```

## The RespGetLeases object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"RespGetLeases":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"leases":{"type":"array","items":{"$ref":"#/components/schemas/LeaseEntry"}},"next_cursor":{"type":"string","description":"Cursor to pass as the cursor param to fetch the next page. Absent if no more pages."}},"required":["code","leases"]},"LeaseEntry":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Lease ID"},"master_account_index":{"type":"integer","format":"int64","description":"Master account index"},"lease_amount":{"type":"integer","format":"int64","description":"Leased LIT amount in raw units (1 LIT = 1e8)"},"fee_amount":{"type":"integer","format":"int64","description":"Fee paid in raw units"},"start":{"type":"integer","format":"int64","description":"Lease start time (Unix milliseconds)"},"end":{"type":"integer","format":"int64","description":"Lease end time (Unix milliseconds)"},"status":{"type":"string","enum":["waiting_fee","leased","expired","canceled"],"description":"Lease status"},"error":{"type":"string","description":"Error message if lease was canceled"}},"required":["end","error","fee_amount","id","lease_amount","master_account_index","start","status"]}}}}
```

## The ReqLITLease object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"ReqLITLease":{"type":"object","properties":{"tx_info":{"type":"string","description":"Signed transaction info (JSON with L2 signature, L1 signature, etc.)"},"lease_amount":{"type":"string","description":"Amount of LIT to lease in raw units (1 LIT = 100000000)"},"duration_days":{"type":"integer","description":"Lease duration in days. Must match one of the available lease options.","format":"int32"}},"required":["tx_info","lease_amount","duration_days"]}}}}
```

## The Referral object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"Referral":{"type":"object","properties":{"l1_address":{"type":"string"},"referral_code":{"type":"string"},"used_at":{"type":"integer","format":"int64"},"trade_stats":{"$ref":"#/components/schemas/TradeStats"},"tier":{"type":"string"},"source":{"type":"string"}},"required":["l1_address","referral_code","used_at","tier","source","trade_stats"]},"TradeStats":{"type":"object","properties":{"count":{"type":"integer","format":"int64"},"volume":{"type":"string"},"web_count":{"type":"integer","format":"int64"},"web_volume":{"type":"string"},"mobile_app_count":{"type":"integer","format":"int64"},"mobile_app_volume":{"type":"string"},"mobile_browser_count":{"type":"integer","format":"int64"},"mobile_browser_volume":{"type":"string"},"maker_fees_paid":{"type":"string"},"non_free_taker_volume":{"type":"string"},"non_free_maker_volume":{"type":"string"},"free_taker_volume":{"type":"string"},"taker_fees_paid":{"type":"string"},"free_maker_volume":{"type":"string"}},"title":"TradeStats","required":["count","volume","web_count","web_volume","mobile_app_count","mobile_app_volume","mobile_browser_count","mobile_browser_volume","free_maker_volume","free_taker_volume","non_free_maker_volume","non_free_taker_volume","maker_fees_paid","taker_fees_paid"]}}}}
```

## The UserReferrals object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"UserReferrals":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"cursor":{"type":"string"},"referrals":{"type":"array","items":{"$ref":"#/components/schemas/Referral"}},"used_code":{"type":"string"},"totals":{"$ref":"#/components/schemas/ReferralTotals"}},"required":["code","cursor","used_code","totals","referrals"]},"Referral":{"type":"object","properties":{"l1_address":{"type":"string"},"referral_code":{"type":"string"},"used_at":{"type":"integer","format":"int64"},"trade_stats":{"$ref":"#/components/schemas/TradeStats"},"tier":{"type":"string"},"source":{"type":"string"}},"required":["l1_address","referral_code","used_at","tier","source","trade_stats"]},"TradeStats":{"type":"object","properties":{"count":{"type":"integer","format":"int64"},"volume":{"type":"string"},"web_count":{"type":"integer","format":"int64"},"web_volume":{"type":"string"},"mobile_app_count":{"type":"integer","format":"int64"},"mobile_app_volume":{"type":"string"},"mobile_browser_count":{"type":"integer","format":"int64"},"mobile_browser_volume":{"type":"string"},"maker_fees_paid":{"type":"string"},"non_free_taker_volume":{"type":"string"},"non_free_maker_volume":{"type":"string"},"free_taker_volume":{"type":"string"},"taker_fees_paid":{"type":"string"},"free_maker_volume":{"type":"string"}},"title":"TradeStats","required":["count","volume","web_count","web_volume","mobile_app_count","mobile_app_volume","mobile_browser_count","mobile_browser_volume","free_maker_volume","free_taker_volume","non_free_maker_volume","non_free_taker_volume","maker_fees_paid","taker_fees_paid"]},"ReferralTotals":{"type":"object","properties":{"count":{"type":"integer","format":"int64"},"volume":{"type":"string"},"free_maker_volume":{"type":"string"},"free_taker_volume":{"type":"string"},"non_free_maker_volume":{"type":"string"},"non_free_taker_volume":{"type":"string"},"maker_fees_paid":{"type":"string"},"taker_fees_paid":{"type":"string"},"total_referrals":{"type":"integer","format":"int64"},"total_premium_referrals":{"type":"integer","format":"int64"}},"title":"ReferralTotals","required":["count","volume","free_maker_volume","free_taker_volume","non_free_maker_volume","non_free_taker_volume","maker_fees_paid","taker_fees_paid","total_referrals","total_premium_referrals"]}}}}
```

## The SystemConfig object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"SystemConfig":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"liquidity_pool_index":{"type":"integer","format":"int64"},"staking_pool_index":{"type":"integer","format":"int64"},"funding_fee_rebate_account_index":{"type":"integer","format":"int64"},"liquidity_pool_cooldown_period":{"type":"integer","format":"int64"},"staking_pool_lockup_period":{"type":"integer","format":"int64"},"max_integrator_perps_maker_fee":{"type":"integer","format":"int32"},"max_integrator_perps_taker_fee":{"type":"integer","format":"int32"},"max_integrator_spot_maker_fee":{"type":"integer","format":"int32"},"max_integrator_spot_taker_fee":{"type":"integer","format":"int32"},"market_maker_incentive_account_index":{"type":"integer","format":"int64"},"fee_collector_account_index":{"type":"integer","format":"int64"}},"required":["code","liquidity_pool_index","staking_pool_index","funding_fee_rebate_account_index","fee_collector_account_index","liquidity_pool_cooldown_period","staking_pool_lockup_period","max_integrator_spot_taker_fee","max_integrator_spot_maker_fee","max_integrator_perps_taker_fee","max_integrator_perps_maker_fee"]}}}}
```

## The PendingUnlock object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"PendingUnlock":{"type":"object","properties":{"unlock_timestamp":{"type":"integer","format":"int64"},"asset_index":{"type":"integer","format":"int16"},"amount":{"type":"string"}},"required":["unlock_timestamp","asset_index","amount"]}}}}
```

## The Strategy object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"Strategy":{"type":"object","properties":{"collateral":{"type":"string"}},"required":["collateral"]}}}}
```

## The TradeStats object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"TradeStats":{"type":"object","properties":{"count":{"type":"integer","format":"int64"},"volume":{"type":"string"},"web_count":{"type":"integer","format":"int64"},"web_volume":{"type":"string"},"mobile_app_count":{"type":"integer","format":"int64"},"mobile_app_volume":{"type":"string"},"mobile_browser_count":{"type":"integer","format":"int64"},"mobile_browser_volume":{"type":"string"},"maker_fees_paid":{"type":"string"},"non_free_taker_volume":{"type":"string"},"non_free_maker_volume":{"type":"string"},"free_taker_volume":{"type":"string"},"taker_fees_paid":{"type":"string"},"free_maker_volume":{"type":"string"}},"title":"TradeStats","required":["count","volume","web_count","web_volume","mobile_app_count","mobile_app_volume","mobile_browser_count","mobile_browser_volume","free_maker_volume","free_taker_volume","non_free_maker_volume","non_free_taker_volume","maker_fees_paid","taker_fees_paid"]}}}}
```

## The ApprovedIntegrator object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"ApprovedIntegrator":{"type":"object","properties":{"account_index":{"type":"integer","format":"int64"},"name":{"type":"string"},"max_perps_taker_fee":{"type":"integer","format":"int32"},"max_perps_maker_fee":{"type":"integer","format":"int32"},"max_spot_taker_fee":{"type":"integer","format":"int32"},"max_spot_maker_fee":{"type":"integer","format":"int32"},"approval_expiry":{"type":"integer","format":"int64","description":" Timestamp in milliseconds, after which the integrator is no longer approved"}},"title":"ApprovedIntegrator","required":["account_index","name","max_perps_taker_fee","max_perps_maker_fee","max_spot_taker_fee","max_spot_maker_fee","approval_expiry"]}}}}
```

## The Token object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"Token":{"type":"object","title":"Token","required":["symbol","backend_symbol","name","logo","logo_extension","description_key","gecko_id","paprika_id","market","asset_type","categories","is_allowed_mainnet","is_asset_allowed_mainnet","default_order_book_group_by"],"properties":{"symbol":{"type":"string"},"name":{"type":"string"},"logo":{"type":"string"},"logo_extension":{"type":"string","enum":["svg","png"]},"description_key":{"type":"string"},"gecko_id":{"type":"string"},"paprika_id":{"type":"string"},"market":{"type":"string","enum":["SPOT","PERPS"]},"asset_type":{"type":"string","enum":["CRYPTO","RWA"]},"categories":{"type":"array","items":{"type":"string"}},"is_allowed_mainnet":{"type":"boolean","format":"boolean"},"is_asset_allowed_mainnet":{"type":"boolean","format":"boolean"},"default_order_book_group_by":{"type":"integer","format":"int64"},"backend_symbol":{"type":"string"}}}}}}
```

## The TokenList object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"TokenList":{"type":"object","title":"TokenList","required":["code","tokens"],"properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"tokens":{"type":"array","items":{"$ref":"#/components/schemas/Token"}}}},"Token":{"type":"object","title":"Token","required":["symbol","backend_symbol","name","logo","logo_extension","description_key","gecko_id","paprika_id","market","asset_type","categories","is_allowed_mainnet","is_asset_allowed_mainnet","default_order_book_group_by"],"properties":{"symbol":{"type":"string"},"name":{"type":"string"},"logo":{"type":"string"},"logo_extension":{"type":"string","enum":["svg","png"]},"description_key":{"type":"string"},"gecko_id":{"type":"string"},"paprika_id":{"type":"string"},"market":{"type":"string","enum":["SPOT","PERPS"]},"asset_type":{"type":"string","enum":["CRYPTO","RWA"]},"categories":{"type":"array","items":{"type":"string"}},"is_allowed_mainnet":{"type":"boolean","format":"boolean"},"is_asset_allowed_mainnet":{"type":"boolean","format":"boolean"},"default_order_book_group_by":{"type":"integer","format":"int64"},"backend_symbol":{"type":"string"}}}}}}
```

## The PartnerStats object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"PartnerStats":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"total_fees_earned":{"type":"string"},"total_taker_fees_earned":{"type":"string"},"total_maker_fees_earned":{"type":"string"},"total_volume":{"type":"string"},"total_taker_volume":{"type":"string"},"total_maker_volume":{"type":"string"},"total_trades":{"type":"integer","format":"int64"},"total_taker_trades":{"type":"integer","format":"int64"},"total_maker_trades":{"type":"integer","format":"int64"},"unique_clients":{"type":"integer","format":"int64"}},"title":"PartnerStats","required":["code","total_fees_earned","total_taker_fees_earned","total_maker_fees_earned","total_volume","total_taker_volume","total_maker_volume","total_trades","total_taker_trades","total_maker_trades","unique_clients"]}}}}
```

## The RespSyntheticSpotInfo object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"RespSyntheticSpotInfo":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"bps_per_day":{"type":"number","format":"double"},"expiry_time_ms":{"type":"integer","format":"int64"},"spot_close_ms":{"type":"integer","format":"int64"},"source":{"type":"string"},"symbol":{"type":"string"}},"title":"RespSyntheticSpotInfo","required":["code","bps_per_day","expiry_time_ms","spot_close_ms","source","symbol"]}}}}
```

## The ReqRespondToRFQ object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"ReqRespondToRFQ":{"type":"object","properties":{"rfq_id":{"type":"integer","format":"int64"},"status":{"type":"string","enum":["acknowledged","liquidity_provided","not_interested"]}},"title":"ReqRespondToRFQ","required":["rfq_id","status"]}}}}
```

## The RespRespondToRFQ object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"RespRespondToRFQ":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"id":{"type":"integer","format":"int64"},"account_index":{"type":"integer","format":"int64"},"market_index":{"type":"integer","format":"int16"},"direction":{"type":"integer","format":"int16"},"base_amount":{"type":"string"},"quote_amount":{"type":"string"},"status":{"type":"string"},"metadata":{"$ref":"#/components/schemas/RFQMetadata"},"responses":{"type":"array","items":{"$ref":"#/components/schemas/RFQResponseEntry"}},"created_at":{"type":"integer","format":"int64"},"updated_at":{"type":"integer","format":"int64"}},"title":"RespRespondToRFQ","required":["code","id","account_index","market_index","direction","base_amount","quote_amount","status","metadata","responses","created_at","updated_at"]},"RFQMetadata":{"type":"object","properties":{"requested_est_price":{"type":"string"},"requested_max_slippage":{"type":"string"},"requested_slippage":{"type":"string"},"worst_price":{"type":"string"},"mark_price":{"type":"string"},"requested_est_fill_fraction":{"type":"string"}},"title":"RFQMetadata","required":["requested_est_price","requested_max_slippage","requested_slippage","requested_est_fill_fraction","mark_price","worst_price"]},"RFQResponseEntry":{"type":"object","properties":{"account_index":{"type":"integer","format":"int64"},"status":{"type":"string","enum":["acknowledged","liquidity_provided","not_interested"]},"responded_at":{"type":"integer","format":"int64"},"updated_at":{"type":"integer","format":"int64"}},"title":"RFQResponseEntry","required":["account_index","status","responded_at","updated_at"]}}}}
```

## The RFQMetadata object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"RFQMetadata":{"type":"object","properties":{"requested_est_price":{"type":"string"},"requested_max_slippage":{"type":"string"},"requested_slippage":{"type":"string"},"worst_price":{"type":"string"},"mark_price":{"type":"string"},"requested_est_fill_fraction":{"type":"string"}},"title":"RFQMetadata","required":["requested_est_price","requested_max_slippage","requested_slippage","requested_est_fill_fraction","mark_price","worst_price"]}}}}
```

## The RFQResponseEntry object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"RFQResponseEntry":{"type":"object","properties":{"account_index":{"type":"integer","format":"int64"},"status":{"type":"string","enum":["acknowledged","liquidity_provided","not_interested"]},"responded_at":{"type":"integer","format":"int64"},"updated_at":{"type":"integer","format":"int64"}},"title":"RFQResponseEntry","required":["account_index","status","responded_at","updated_at"]}}}}
```

## The RespListRFQs object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"RespListRFQs":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"rfqs":{"type":"array","items":{"$ref":"#/components/schemas/RFQEntry"}},"next_cursor":{"type":"string"}},"title":"RespListRFQs","required":["code","rfqs"]},"RFQEntry":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"account_index":{"type":"integer","format":"int64"},"market_index":{"type":"integer","format":"int16"},"direction":{"type":"integer","format":"int16"},"base_amount":{"type":"string"},"quote_amount":{"type":"string"},"status":{"type":"string"},"metadata":{"$ref":"#/components/schemas/RFQMetadata"},"responses":{"type":"array","items":{"$ref":"#/components/schemas/RFQResponseEntry"}},"created_at":{"type":"integer","format":"int64"},"updated_at":{"type":"integer","format":"int64"}},"title":"RFQEntry","required":["id","account_index","market_index","direction","base_amount","quote_amount","status","metadata","responses","created_at","updated_at"]},"RFQMetadata":{"type":"object","properties":{"requested_est_price":{"type":"string"},"requested_max_slippage":{"type":"string"},"requested_slippage":{"type":"string"},"worst_price":{"type":"string"},"mark_price":{"type":"string"},"requested_est_fill_fraction":{"type":"string"}},"title":"RFQMetadata","required":["requested_est_price","requested_max_slippage","requested_slippage","requested_est_fill_fraction","mark_price","worst_price"]},"RFQResponseEntry":{"type":"object","properties":{"account_index":{"type":"integer","format":"int64"},"status":{"type":"string","enum":["acknowledged","liquidity_provided","not_interested"]},"responded_at":{"type":"integer","format":"int64"},"updated_at":{"type":"integer","format":"int64"}},"title":"RFQResponseEntry","required":["account_index","status","responded_at","updated_at"]}}}}
```

## The RFQEntry object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"RFQEntry":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"account_index":{"type":"integer","format":"int64"},"market_index":{"type":"integer","format":"int16"},"direction":{"type":"integer","format":"int16"},"base_amount":{"type":"string"},"quote_amount":{"type":"string"},"status":{"type":"string"},"metadata":{"$ref":"#/components/schemas/RFQMetadata"},"responses":{"type":"array","items":{"$ref":"#/components/schemas/RFQResponseEntry"}},"created_at":{"type":"integer","format":"int64"},"updated_at":{"type":"integer","format":"int64"}},"title":"RFQEntry","required":["id","account_index","market_index","direction","base_amount","quote_amount","status","metadata","responses","created_at","updated_at"]},"RFQMetadata":{"type":"object","properties":{"requested_est_price":{"type":"string"},"requested_max_slippage":{"type":"string"},"requested_slippage":{"type":"string"},"worst_price":{"type":"string"},"mark_price":{"type":"string"},"requested_est_fill_fraction":{"type":"string"}},"title":"RFQMetadata","required":["requested_est_price","requested_max_slippage","requested_slippage","requested_est_fill_fraction","mark_price","worst_price"]},"RFQResponseEntry":{"type":"object","properties":{"account_index":{"type":"integer","format":"int64"},"status":{"type":"string","enum":["acknowledged","liquidity_provided","not_interested"]},"responded_at":{"type":"integer","format":"int64"},"updated_at":{"type":"integer","format":"int64"}},"title":"RFQResponseEntry","required":["account_index","status","responded_at","updated_at"]}}}}
```

## The RespGetRFQ object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"RespGetRFQ":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"id":{"type":"integer","format":"int64"},"account_index":{"type":"integer","format":"int64"},"market_index":{"type":"integer","format":"int16"},"direction":{"type":"integer","format":"int16"},"base_amount":{"type":"string"},"quote_amount":{"type":"string"},"status":{"type":"string"},"metadata":{"$ref":"#/components/schemas/RFQMetadata"},"responses":{"type":"array","items":{"$ref":"#/components/schemas/RFQResponseEntry"}},"created_at":{"type":"integer","format":"int64"},"updated_at":{"type":"integer","format":"int64"}},"title":"RespGetRFQ","required":["code","id","account_index","market_index","direction","base_amount","quote_amount","status","metadata","responses","created_at","updated_at"]},"RFQMetadata":{"type":"object","properties":{"requested_est_price":{"type":"string"},"requested_max_slippage":{"type":"string"},"requested_slippage":{"type":"string"},"worst_price":{"type":"string"},"mark_price":{"type":"string"},"requested_est_fill_fraction":{"type":"string"}},"title":"RFQMetadata","required":["requested_est_price","requested_max_slippage","requested_slippage","requested_est_fill_fraction","mark_price","worst_price"]},"RFQResponseEntry":{"type":"object","properties":{"account_index":{"type":"integer","format":"int64"},"status":{"type":"string","enum":["acknowledged","liquidity_provided","not_interested"]},"responded_at":{"type":"integer","format":"int64"},"updated_at":{"type":"integer","format":"int64"}},"title":"RFQResponseEntry","required":["account_index","status","responded_at","updated_at"]}}}}
```

## The ReqCreateRFQ object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"ReqCreateRFQ":{"type":"object","properties":{"market_index":{"type":"integer","format":"int16"},"base_amount":{"type":"string"},"quote_amount":{"type":"string"},"direction":{"type":"integer","format":"int16","enum":["0","1"]},"metadata":{"type":"string"}},"title":"ReqCreateRFQ","required":["market_index","direction"]}}}}
```

## The RespCreateRFQ object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"RespCreateRFQ":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"id":{"type":"integer","format":"int64"},"account_index":{"type":"integer","format":"int64"},"market_index":{"type":"integer","format":"int16"},"direction":{"type":"integer","format":"int16"},"base_amount":{"type":"string"},"quote_amount":{"type":"string"},"status":{"type":"string"},"metadata":{"$ref":"#/components/schemas/RFQMetadata"},"responses":{"type":"array","items":{"$ref":"#/components/schemas/RFQResponseEntry"}},"created_at":{"type":"integer","format":"int64"},"updated_at":{"type":"integer","format":"int64"}},"title":"RespCreateRFQ","required":["code","id","account_index","market_index","direction","base_amount","quote_amount","status","metadata","responses","created_at","updated_at"]},"RFQMetadata":{"type":"object","properties":{"requested_est_price":{"type":"string"},"requested_max_slippage":{"type":"string"},"requested_slippage":{"type":"string"},"worst_price":{"type":"string"},"mark_price":{"type":"string"},"requested_est_fill_fraction":{"type":"string"}},"title":"RFQMetadata","required":["requested_est_price","requested_max_slippage","requested_slippage","requested_est_fill_fraction","mark_price","worst_price"]},"RFQResponseEntry":{"type":"object","properties":{"account_index":{"type":"integer","format":"int64"},"status":{"type":"string","enum":["acknowledged","liquidity_provided","not_interested"]},"responded_at":{"type":"integer","format":"int64"},"updated_at":{"type":"integer","format":"int64"}},"title":"RFQResponseEntry","required":["account_index","status","responded_at","updated_at"]}}}}
```

## The ReqUpdateRFQ object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"ReqUpdateRFQ":{"type":"object","properties":{"rfq_id":{"type":"integer","format":"int64"},"status":{"type":"string","enum":["order_created","closed"]}},"title":"ReqUpdateRFQ","required":["rfq_id","status"]}}}}
```

## The RespUpdateRFQ object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"RespUpdateRFQ":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"id":{"type":"integer","format":"int64"},"account_index":{"type":"integer","format":"int64"},"market_index":{"type":"integer","format":"int16"},"direction":{"type":"integer","format":"int16"},"base_amount":{"type":"string"},"quote_amount":{"type":"string"},"status":{"type":"string"},"metadata":{"$ref":"#/components/schemas/RFQMetadata"},"responses":{"type":"array","items":{"$ref":"#/components/schemas/RFQResponseEntry"}},"created_at":{"type":"integer","format":"int64"},"updated_at":{"type":"integer","format":"int64"}},"title":"RespUpdateRFQ","required":["code","id","account_index","market_index","direction","base_amount","quote_amount","status","metadata","responses","created_at","updated_at"]},"RFQMetadata":{"type":"object","properties":{"requested_est_price":{"type":"string"},"requested_max_slippage":{"type":"string"},"requested_slippage":{"type":"string"},"worst_price":{"type":"string"},"mark_price":{"type":"string"},"requested_est_fill_fraction":{"type":"string"}},"title":"RFQMetadata","required":["requested_est_price","requested_max_slippage","requested_slippage","requested_est_fill_fraction","mark_price","worst_price"]},"RFQResponseEntry":{"type":"object","properties":{"account_index":{"type":"integer","format":"int64"},"status":{"type":"string","enum":["acknowledged","liquidity_provided","not_interested"]},"responded_at":{"type":"integer","format":"int64"},"updated_at":{"type":"integer","format":"int64"}},"title":"RFQResponseEntry","required":["account_index","status","responded_at","updated_at"]}}}}
```

## The MarkPriceCandles object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"MarkPriceCandles":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"r":{"type":"string","description":" resolution"},"c":{"type":"array","items":{"$ref":"#/components/schemas/MarkPriceCandle"},"description":" candles"}},"title":"MarkPriceCandles","required":["code","r","c"]},"MarkPriceCandle":{"type":"object","properties":{"t":{"type":"integer","format":"int64","description":" timestamp"},"o":{"type":"number","format":"double","description":" open"},"h":{"type":"number","format":"double","description":" high"},"l":{"type":"number","format":"double","description":" low"},"c":{"type":"number","format":"double","description":" close"},"sc":{"type":"integer","format":"int64","description":" sample_count"}},"title":"MarkPriceCandle","required":["t","o","h","l","c","sc"]}}}}
```

## The MarkPriceCandle object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"MarkPriceCandle":{"type":"object","properties":{"t":{"type":"integer","format":"int64","description":" timestamp"},"o":{"type":"number","format":"double","description":" open"},"h":{"type":"number","format":"double","description":" high"},"l":{"type":"number","format":"double","description":" low"},"c":{"type":"number","format":"double","description":" close"},"sc":{"type":"integer","format":"int64","description":" sample_count"}},"title":"MarkPriceCandle","required":["t","o","h","l","c","sc"]}}}}
```

## The MarketPriceCharts object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"MarketPriceCharts":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"resolution":{"type":"string"},"price_charts":{"type":"array","items":{"$ref":"#/components/schemas/MarketPriceChart"}}},"title":"MarketPriceCharts","required":["code","resolution","price_charts"]},"MarketPriceChart":{"type":"object","properties":{"market_id":{"type":"integer","format":"int16"},"prices":{"type":"array","items":{"type":"string"}}},"title":"MarketPriceChart","required":["market_id","prices"]}}}}
```

## The MarketPriceChart object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"MarketPriceChart":{"type":"object","properties":{"market_id":{"type":"integer","format":"int16"},"prices":{"type":"array","items":{"type":"string"}}},"title":"MarketPriceChart","required":["market_id","prices"]}}}}
```

## The LivePointsTotal object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"LivePointsTotal":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"total_live_points":{"type":"number","format":"double"}},"title":"LivePointsTotal","required":["code","total_live_points"]}}}}
```

## The ReferralProgramKickback object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"ReferralProgramKickback":{"type":"object","properties":{"date":{"type":"integer","format":"int64"},"percentage":{"type":"string"}},"title":"ReferralProgramKickback","required":["date","percentage"]}}}}
```

## The ReferralTotals object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"ReferralTotals":{"type":"object","properties":{"count":{"type":"integer","format":"int64"},"volume":{"type":"string"},"free_maker_volume":{"type":"string"},"free_taker_volume":{"type":"string"},"non_free_maker_volume":{"type":"string"},"non_free_taker_volume":{"type":"string"},"maker_fees_paid":{"type":"string"},"taker_fees_paid":{"type":"string"},"total_referrals":{"type":"integer","format":"int64"},"total_premium_referrals":{"type":"integer","format":"int64"}},"title":"ReferralTotals","required":["count","volume","free_maker_volume","free_taker_volume","non_free_maker_volume","non_free_taker_volume","maker_fees_paid","taker_fees_paid","total_referrals","total_premium_referrals"]}}}}
```

## The Leaderboard object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"Leaderboard":{"type":"object","properties":{"entries":{"type":"array","items":{"$ref":"#/components/schemas/LeaderboardEntry"}}},"title":"Leaderboard","required":["entries"]},"LeaderboardEntry":{"type":"object","properties":{"l1_address":{"type":"string"},"points":{"type":"number","format":"float"},"entry":{"type":"integer","format":"int32"},"entryId":{"type":"integer","format":"int32"},"metadata":{"type":"string"}},"title":"LeaderboardEntry","required":["l1_address","points","entry","entryId","metadata"]}}}}
```

## The LeaderboardEntry object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"LeaderboardEntry":{"type":"object","properties":{"l1_address":{"type":"string"},"points":{"type":"number","format":"float"},"entry":{"type":"integer","format":"int32"},"entryId":{"type":"integer","format":"int32"},"metadata":{"type":"string"}},"title":"LeaderboardEntry","required":["l1_address","points","entry","entryId","metadata"]}}}}
```

## The ReferralStats object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"ReferralStats":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"stats":{"type":"array","items":{"$ref":"#/components/schemas/ReferralStat"}}},"title":"ReferralStats","required":["code","stats"]},"ReferralStat":{"type":"object","properties":{"start_timestamp":{"type":"integer","format":"int64"},"end_timestamp":{"type":"integer","format":"int64"},"trade_stats":{"$ref":"#/components/schemas/TradeStats"}},"title":"ReferralStat","required":["start_timestamp","end_timestamp","trade_stats"]},"TradeStats":{"type":"object","properties":{"count":{"type":"integer","format":"int64"},"volume":{"type":"string"},"web_count":{"type":"integer","format":"int64"},"web_volume":{"type":"string"},"mobile_app_count":{"type":"integer","format":"int64"},"mobile_app_volume":{"type":"string"},"mobile_browser_count":{"type":"integer","format":"int64"},"mobile_browser_volume":{"type":"string"},"maker_fees_paid":{"type":"string"},"non_free_taker_volume":{"type":"string"},"non_free_maker_volume":{"type":"string"},"free_taker_volume":{"type":"string"},"taker_fees_paid":{"type":"string"},"free_maker_volume":{"type":"string"}},"title":"TradeStats","required":["count","volume","web_count","web_volume","mobile_app_count","mobile_app_volume","mobile_browser_count","mobile_browser_volume","free_maker_volume","free_taker_volume","non_free_maker_volume","non_free_taker_volume","maker_fees_paid","taker_fees_paid"]}}}}
```

## The ReferralStat object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"ReferralStat":{"type":"object","properties":{"start_timestamp":{"type":"integer","format":"int64"},"end_timestamp":{"type":"integer","format":"int64"},"trade_stats":{"$ref":"#/components/schemas/TradeStats"}},"title":"ReferralStat","required":["start_timestamp","end_timestamp","trade_stats"]},"TradeStats":{"type":"object","properties":{"count":{"type":"integer","format":"int64"},"volume":{"type":"string"},"web_count":{"type":"integer","format":"int64"},"web_volume":{"type":"string"},"mobile_app_count":{"type":"integer","format":"int64"},"mobile_app_volume":{"type":"string"},"mobile_browser_count":{"type":"integer","format":"int64"},"mobile_browser_volume":{"type":"string"},"maker_fees_paid":{"type":"string"},"non_free_taker_volume":{"type":"string"},"non_free_maker_volume":{"type":"string"},"free_taker_volume":{"type":"string"},"taker_fees_paid":{"type":"string"},"free_maker_volume":{"type":"string"}},"title":"TradeStats","required":["count","volume","web_count","web_volume","mobile_app_count","mobile_app_volume","mobile_browser_count","mobile_browser_volume","free_maker_volume","free_taker_volume","non_free_maker_volume","non_free_taker_volume","maker_fees_paid","taker_fees_paid"]}}}}
```

## The HistoricalTradesExportData object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"HistoricalTradesExportData":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"data_url":{"type":"string"},"expires_at":{"type":"string"}},"title":"HistoricalTradesExportData","required":["code","data_url","expires_at"]}}}}
```

## The PnlLeaderboard object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"PnlLeaderboard":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"entries":{"type":"array","items":{"$ref":"#/components/schemas/PnlLeaderboardEntry"}},"total":{"type":"integer","format":"int64"},"updated_at":{"type":"integer","format":"int64"}},"title":"PnlLeaderboard","required":["code","entries","total","updated_at"]},"PnlLeaderboardEntry":{"type":"object","properties":{"rank":{"type":"integer","format":"int64"},"l1_address":{"type":"string"},"account_value":{"type":"number","format":"double"},"pnl":{"type":"number","format":"double"},"roi":{"type":"number","format":"double"},"volume":{"type":"number","format":"double"}},"title":"PnlLeaderboardEntry","required":["rank","l1_address","account_value","pnl","roi","volume"]}}}}
```

## The PnlLeaderboardEntry object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"PnlLeaderboardEntry":{"type":"object","properties":{"rank":{"type":"integer","format":"int64"},"l1_address":{"type":"string"},"account_value":{"type":"number","format":"double"},"pnl":{"type":"number","format":"double"},"roi":{"type":"number","format":"double"},"volume":{"type":"number","format":"double"}},"title":"PnlLeaderboardEntry","required":["rank","l1_address","account_value","pnl","roi","volume"]}}}}
```

## The RespPriceOracleInfo object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"RespPriceOracleInfo":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"computed_at_ms":{"type":"integer","format":"int64"},"markets":{"type":"array","items":{"$ref":"#/components/schemas/PriceOracleMarket"}}},"title":"RespPriceOracleInfo","required":["code","computed_at_ms","markets"]},"PriceOracleMarket":{"type":"object","properties":{"symbol":{"type":"string"},"index":{"$ref":"#/components/schemas/PriceOraclePrice"},"mark":{"$ref":"#/components/schemas/PriceOraclePrice"}},"title":"PriceOracleMarket","required":["symbol","index","mark"]},"PriceOraclePrice":{"type":"object","properties":{"source":{"type":"string"},"using_median":{"type":"boolean","format":"boolean"},"using_internal_price":{"type":"boolean","format":"boolean"},"median_sources":{"type":"array","items":{"type":"string"}},"price_cap_bps":{"type":"number","format":"double"},"price_cap_reference_price":{"type":"number","format":"double","description":" cap bounds: ref * (1 -/+ bps / 10000)"}},"title":"PriceOraclePrice","required":["source","using_median","using_internal_price","median_sources","price_cap_bps","price_cap_reference_price"]}}}}
```

## The PriceOracleMarket object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"PriceOracleMarket":{"type":"object","properties":{"symbol":{"type":"string"},"index":{"$ref":"#/components/schemas/PriceOraclePrice"},"mark":{"$ref":"#/components/schemas/PriceOraclePrice"}},"title":"PriceOracleMarket","required":["symbol","index","mark"]},"PriceOraclePrice":{"type":"object","properties":{"source":{"type":"string"},"using_median":{"type":"boolean","format":"boolean"},"using_internal_price":{"type":"boolean","format":"boolean"},"median_sources":{"type":"array","items":{"type":"string"}},"price_cap_bps":{"type":"number","format":"double"},"price_cap_reference_price":{"type":"number","format":"double","description":" cap bounds: ref * (1 -/+ bps / 10000)"}},"title":"PriceOraclePrice","required":["source","using_median","using_internal_price","median_sources","price_cap_bps","price_cap_reference_price"]}}}}
```

## The PriceOraclePrice object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"PriceOraclePrice":{"type":"object","properties":{"source":{"type":"string"},"using_median":{"type":"boolean","format":"boolean"},"using_internal_price":{"type":"boolean","format":"boolean"},"median_sources":{"type":"array","items":{"type":"string"}},"price_cap_bps":{"type":"number","format":"double"},"price_cap_reference_price":{"type":"number","format":"double","description":" cap bounds: ref * (1 -/+ bps / 10000)"}},"title":"PriceOraclePrice","required":["source","using_median","using_internal_price","median_sources","price_cap_bps","price_cap_reference_price"]}}}}
```

## The RespGetUpDownCandles object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"RespGetUpDownCandles":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"candles":{"type":"array","items":{"$ref":"#/components/schemas/UpDownCandle"},"description":" ascending by timestamp"},"next_cursor":{"type":"integer","format":"int64","description":" start_timestamp of the next page; 0 when the range is exhausted"}},"title":"RespGetUpDownCandles","required":["code","candles"]},"UpDownCandle":{"type":"object","properties":{"symbol":{"type":"string"},"duration":{"type":"string"},"resolution":{"type":"string"},"timestamp":{"type":"integer","format":"int64","description":" bucket start, unix seconds"},"open":{"type":"string","description":" exact provider prices, decimal strings"},"high":{"type":"string"},"low":{"type":"string"},"close":{"type":"string"},"provider":{"type":"string","description":" provider feed of the last observation of the candle"},"feed_id":{"type":"string"}},"title":"UpDownCandle","required":["symbol","duration","resolution","timestamp","open","high","low","close","provider","feed_id"]}}}}
```

## The UpDownCandle object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"UpDownCandle":{"type":"object","properties":{"symbol":{"type":"string"},"duration":{"type":"string"},"resolution":{"type":"string"},"timestamp":{"type":"integer","format":"int64","description":" bucket start, unix seconds"},"open":{"type":"string","description":" exact provider prices, decimal strings"},"high":{"type":"string"},"low":{"type":"string"},"close":{"type":"string"},"provider":{"type":"string","description":" provider feed of the last observation of the candle"},"feed_id":{"type":"string"}},"title":"UpDownCandle","required":["symbol","duration","resolution","timestamp","open","high","low","close","provider","feed_id"]}}}}
```

## The RespGetBoPnL object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"RespGetBoPnL":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"events":{"type":"array","items":{"$ref":"#/components/schemas/BoEventPnL"}},"next_cursor":{"type":"integer","format":"int64"}},"title":"RespGetBoPnL","required":["code","events"]},"BoEventPnL":{"type":"object","properties":{"event_id":{"type":"integer","format":"int64"},"event_title":{"type":"string"},"event_description":{"type":"string"},"total_pnl":{"type":"string"},"outcomes":{"type":"array","items":{"$ref":"#/components/schemas/BoOutcomePnL"}}},"title":"BoEventPnL","required":["event_id","event_title","event_description","total_pnl","outcomes"]},"BoOutcomePnL":{"type":"object","properties":{"market_id":{"type":"integer","format":"int64"},"symbol":{"type":"string"},"outcome":{"type":"integer","format":"int32","enum":[0,1,2]},"end_timestamp":{"type":"integer","format":"int64"},"settlement_pnl":{"type":"string","nullable":true},"last_trade_id":{"type":"integer","format":"int64"},"total_pnl":{"type":"string"}},"title":"BoOutcomePnL","required":["market_id","symbol","outcome","end_timestamp","settlement_pnl","last_trade_id","total_pnl"]}}}}
```

## The BoEventPnL object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"BoEventPnL":{"type":"object","properties":{"event_id":{"type":"integer","format":"int64"},"event_title":{"type":"string"},"event_description":{"type":"string"},"total_pnl":{"type":"string"},"outcomes":{"type":"array","items":{"$ref":"#/components/schemas/BoOutcomePnL"}}},"title":"BoEventPnL","required":["event_id","event_title","event_description","total_pnl","outcomes"]},"BoOutcomePnL":{"type":"object","properties":{"market_id":{"type":"integer","format":"int64"},"symbol":{"type":"string"},"outcome":{"type":"integer","format":"int32","enum":[0,1,2]},"end_timestamp":{"type":"integer","format":"int64"},"settlement_pnl":{"type":"string","nullable":true},"last_trade_id":{"type":"integer","format":"int64"},"total_pnl":{"type":"string"}},"title":"BoOutcomePnL","required":["market_id","symbol","outcome","end_timestamp","settlement_pnl","last_trade_id","total_pnl"]}}}}
```

## The BoOutcomePnL object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"BoOutcomePnL":{"type":"object","properties":{"market_id":{"type":"integer","format":"int64"},"symbol":{"type":"string"},"outcome":{"type":"integer","format":"int32","enum":[0,1,2]},"end_timestamp":{"type":"integer","format":"int64"},"settlement_pnl":{"type":"string","nullable":true},"last_trade_id":{"type":"integer","format":"int64"},"total_pnl":{"type":"string"}},"title":"BoOutcomePnL","required":["market_id","symbol","outcome","end_timestamp","settlement_pnl","last_trade_id","total_pnl"]}}}}
```

## The FeeTiers object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"FeeTiers":{"type":"object","properties":{"user_tiers":{"type":"array","items":{"$ref":"#/components/schemas/UserFeeTier"}},"bo_tiers":{"type":"array","items":{"$ref":"#/components/schemas/BoFeeTier"}},"staking_tiers":{"type":"array","items":{"$ref":"#/components/schemas/StakingFeeTier"}}},"title":"FeeTiers","required":["user_tiers","bo_tiers","staking_tiers"]},"UserFeeTier":{"type":"object","properties":{"name":{"type":"string"},"level":{"type":"integer","format":"int32"},"maker_fee_ticks":{"type":"integer","format":"int32"},"taker_fee_ticks":{"type":"integer","format":"int32"},"required_lit_stakes":{"type":"integer","format":"int64"},"required_volume":{"type":"integer","format":"int64"}},"title":"UserFeeTier","required":["name","level","maker_fee_ticks","taker_fee_ticks","required_lit_stakes","required_volume"]},"BoFeeTier":{"type":"object","properties":{"name":{"type":"string"},"required_volume":{"type":"integer","format":"int64"},"fee_rate":{"type":"number","format":"double"}},"title":"BoFeeTier","required":["name","required_volume","fee_rate"]},"StakingFeeTier":{"type":"object","properties":{"name":{"type":"string"},"required_lit_stakes":{"type":"integer","format":"int64"},"fee_rate":{"type":"number","format":"double"}},"title":"StakingFeeTier","required":["name","required_lit_stakes","fee_rate"]}}}}
```

## The StakingFeeTier object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"StakingFeeTier":{"type":"object","properties":{"name":{"type":"string"},"required_lit_stakes":{"type":"integer","format":"int64"},"fee_rate":{"type":"number","format":"double"}},"title":"StakingFeeTier","required":["name","required_lit_stakes","fee_rate"]}}}}
```

## The BoFeeTier object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"BoFeeTier":{"type":"object","properties":{"name":{"type":"string"},"required_volume":{"type":"integer","format":"int64"},"fee_rate":{"type":"number","format":"double"}},"title":"BoFeeTier","required":["name","required_volume","fee_rate"]}}}}
```

## The UserFeeTier object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"UserFeeTier":{"type":"object","properties":{"name":{"type":"string"},"level":{"type":"integer","format":"int32"},"maker_fee_ticks":{"type":"integer","format":"int32"},"taker_fee_ticks":{"type":"integer","format":"int32"},"required_lit_stakes":{"type":"integer","format":"int64"},"required_volume":{"type":"integer","format":"int64"}},"title":"UserFeeTier","required":["name","level","maker_fee_ticks","taker_fee_ticks","required_lit_stakes","required_volume"]}}}}
```

## The RespGetEvents object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"RespGetEvents":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"next_cursor":{"type":"integer","format":"int64"},"events":{"type":"array","items":{"$ref":"#/components/schemas/EventDetail"}}},"title":"RespGetEvents","required":["code","events"]},"EventDetail":{"type":"object","properties":{"event_id":{"type":"integer","format":"int64"},"title":{"type":"string"},"description":{"type":"string"},"creator_account_index":{"type":"integer","format":"int64"},"created_at":{"type":"integer","format":"int64"},"tag":{"type":"string"},"event_kind":{"type":"string","enum":["one_off","recurrent"]},"recurrence_period_seconds":{"type":"integer","format":"int32"},"start_at":{"type":"integer","format":"int64"},"end_at":{"type":"integer","format":"int64"},"metadata":{"type":"object","additionalProperties":true},"order_books":{"type":"array","items":{"$ref":"#/components/schemas/EventOrderBookEntry"}},"lifetime_quote_token_volume":{"type":"number","format":"double"}},"title":"EventDetail","required":["event_id","title","description","creator_account_index","created_at","tag","event_kind","recurrence_period_seconds","start_at","end_at","metadata","order_books","lifetime_quote_token_volume"]},"EventOrderBookEntry":{"type":"object","properties":{"symbol":{"type":"string"},"market_id":{"type":"integer","format":"int64"},"market_type":{"type":"string","enum":["perp","spot","binary_options"]},"base_asset_id":{"type":"integer","format":"int16"},"quote_asset_id":{"type":"integer","format":"int16"},"status":{"type":"string","enum":["inactive","active","in-settlement","waiting-for-settlement","settled"],"description":" waiting-for-settlement and settled are binary options only"},"taker_fee":{"type":"string"},"is_taker_fee_enabled":{"type":"boolean","format":"boolean"},"maker_fee":{"type":"string"},"is_maker_fee_enabled":{"type":"boolean","format":"boolean"},"liquidation_fee":{"type":"string"},"min_base_amount":{"type":"string"},"min_quote_amount":{"type":"string"},"order_quote_limit":{"type":"string"},"supported_size_decimals":{"type":"integer","format":"uint8"},"supported_price_decimals":{"type":"integer","format":"uint8"},"supported_quote_decimals":{"type":"integer","format":"uint8"},"created_at":{"type":"string"},"multiplier":{"type":"string"},"start_timestamp":{"type":"integer","format":"int64"},"end_timestamp":{"type":"integer","format":"int64"},"open_interest":{"type":"string"},"outcome":{"type":"integer","format":"int32","enum":[0,1,2]},"operator_account_index":{"type":"integer","format":"int64"},"settlement_cap":{"type":"integer","format":"int32"},"settlement_type":{"type":"integer","format":"int32","enum":[0,1]},"settlement_price":{"type":"integer","format":"int32"},"default_price":{"type":"integer","format":"int32"},"is_frozen":{"type":"boolean","format":"boolean"},"size_decimals":{"type":"integer","format":"uint8"},"price_decimals":{"type":"integer","format":"uint8"},"stats":{"$ref":"#/components/schemas/BinaryOptionMarketStats"}},"title":"EventOrderBookEntry","required":["symbol","market_id","market_type","base_asset_id","quote_asset_id","status","taker_fee","is_taker_fee_enabled","maker_fee","is_maker_fee_enabled","liquidation_fee","min_base_amount","min_quote_amount","order_quote_limit","supported_size_decimals","supported_price_decimals","supported_quote_decimals","created_at","multiplier","start_timestamp","end_timestamp","open_interest","outcome","operator_account_index","settlement_cap","settlement_type","settlement_price","default_price","is_frozen","size_decimals","price_decimals","stats"]},"BinaryOptionMarketStats":{"type":"object","properties":{"symbol":{"type":"string"},"market_id":{"type":"integer","format":"int64"},"mid_price":{"type":"string"},"best_ask_price":{"type":"string"},"best_bid_price":{"type":"string"},"last_trade_price":{"type":"string"},"daily_base_token_volume":{"type":"number","format":"double"},"daily_quote_token_volume":{"type":"number","format":"double"},"daily_price_low":{"type":"number","format":"double"},"daily_price_high":{"type":"number","format":"double"},"daily_price_change":{"type":"number","format":"double"},"lifetime_quote_token_volume":{"type":"number","format":"double"},"lifetime_base_token_volume":{"type":"number","format":"double","description":" outcome shares traded over the market's life"},"open_interest":{"type":"string"},"status":{"type":"string","enum":["inactive","active","waiting-for-settlement","in-settlement","settled"],"description":" inactive before the trading window opens, waiting-for-settlement once it closes"},"outcome":{"type":"integer","format":"int32","enum":[0,1,2]}},"title":"BinaryOptionMarketStats","required":["symbol","market_id","mid_price","best_ask_price","best_bid_price","last_trade_price","daily_base_token_volume","daily_quote_token_volume","daily_price_low","daily_price_high","daily_price_change","lifetime_quote_token_volume","lifetime_base_token_volume","open_interest","status","outcome"]}}}}
```

## The EventDetail object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"EventDetail":{"type":"object","properties":{"event_id":{"type":"integer","format":"int64"},"title":{"type":"string"},"description":{"type":"string"},"creator_account_index":{"type":"integer","format":"int64"},"created_at":{"type":"integer","format":"int64"},"tag":{"type":"string"},"event_kind":{"type":"string","enum":["one_off","recurrent"]},"recurrence_period_seconds":{"type":"integer","format":"int32"},"start_at":{"type":"integer","format":"int64"},"end_at":{"type":"integer","format":"int64"},"metadata":{"type":"object","additionalProperties":true},"order_books":{"type":"array","items":{"$ref":"#/components/schemas/EventOrderBookEntry"}},"lifetime_quote_token_volume":{"type":"number","format":"double"}},"title":"EventDetail","required":["event_id","title","description","creator_account_index","created_at","tag","event_kind","recurrence_period_seconds","start_at","end_at","metadata","order_books","lifetime_quote_token_volume"]},"EventOrderBookEntry":{"type":"object","properties":{"symbol":{"type":"string"},"market_id":{"type":"integer","format":"int64"},"market_type":{"type":"string","enum":["perp","spot","binary_options"]},"base_asset_id":{"type":"integer","format":"int16"},"quote_asset_id":{"type":"integer","format":"int16"},"status":{"type":"string","enum":["inactive","active","in-settlement","waiting-for-settlement","settled"],"description":" waiting-for-settlement and settled are binary options only"},"taker_fee":{"type":"string"},"is_taker_fee_enabled":{"type":"boolean","format":"boolean"},"maker_fee":{"type":"string"},"is_maker_fee_enabled":{"type":"boolean","format":"boolean"},"liquidation_fee":{"type":"string"},"min_base_amount":{"type":"string"},"min_quote_amount":{"type":"string"},"order_quote_limit":{"type":"string"},"supported_size_decimals":{"type":"integer","format":"uint8"},"supported_price_decimals":{"type":"integer","format":"uint8"},"supported_quote_decimals":{"type":"integer","format":"uint8"},"created_at":{"type":"string"},"multiplier":{"type":"string"},"start_timestamp":{"type":"integer","format":"int64"},"end_timestamp":{"type":"integer","format":"int64"},"open_interest":{"type":"string"},"outcome":{"type":"integer","format":"int32","enum":[0,1,2]},"operator_account_index":{"type":"integer","format":"int64"},"settlement_cap":{"type":"integer","format":"int32"},"settlement_type":{"type":"integer","format":"int32","enum":[0,1]},"settlement_price":{"type":"integer","format":"int32"},"default_price":{"type":"integer","format":"int32"},"is_frozen":{"type":"boolean","format":"boolean"},"size_decimals":{"type":"integer","format":"uint8"},"price_decimals":{"type":"integer","format":"uint8"},"stats":{"$ref":"#/components/schemas/BinaryOptionMarketStats"}},"title":"EventOrderBookEntry","required":["symbol","market_id","market_type","base_asset_id","quote_asset_id","status","taker_fee","is_taker_fee_enabled","maker_fee","is_maker_fee_enabled","liquidation_fee","min_base_amount","min_quote_amount","order_quote_limit","supported_size_decimals","supported_price_decimals","supported_quote_decimals","created_at","multiplier","start_timestamp","end_timestamp","open_interest","outcome","operator_account_index","settlement_cap","settlement_type","settlement_price","default_price","is_frozen","size_decimals","price_decimals","stats"]},"BinaryOptionMarketStats":{"type":"object","properties":{"symbol":{"type":"string"},"market_id":{"type":"integer","format":"int64"},"mid_price":{"type":"string"},"best_ask_price":{"type":"string"},"best_bid_price":{"type":"string"},"last_trade_price":{"type":"string"},"daily_base_token_volume":{"type":"number","format":"double"},"daily_quote_token_volume":{"type":"number","format":"double"},"daily_price_low":{"type":"number","format":"double"},"daily_price_high":{"type":"number","format":"double"},"daily_price_change":{"type":"number","format":"double"},"lifetime_quote_token_volume":{"type":"number","format":"double"},"lifetime_base_token_volume":{"type":"number","format":"double","description":" outcome shares traded over the market's life"},"open_interest":{"type":"string"},"status":{"type":"string","enum":["inactive","active","waiting-for-settlement","in-settlement","settled"],"description":" inactive before the trading window opens, waiting-for-settlement once it closes"},"outcome":{"type":"integer","format":"int32","enum":[0,1,2]}},"title":"BinaryOptionMarketStats","required":["symbol","market_id","mid_price","best_ask_price","best_bid_price","last_trade_price","daily_base_token_volume","daily_quote_token_volume","daily_price_low","daily_price_high","daily_price_change","lifetime_quote_token_volume","lifetime_base_token_volume","open_interest","status","outcome"]}}}}
```

## The EventOrderBookEntry object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"EventOrderBookEntry":{"type":"object","properties":{"symbol":{"type":"string"},"market_id":{"type":"integer","format":"int64"},"market_type":{"type":"string","enum":["perp","spot","binary_options"]},"base_asset_id":{"type":"integer","format":"int16"},"quote_asset_id":{"type":"integer","format":"int16"},"status":{"type":"string","enum":["inactive","active","in-settlement","waiting-for-settlement","settled"],"description":" waiting-for-settlement and settled are binary options only"},"taker_fee":{"type":"string"},"is_taker_fee_enabled":{"type":"boolean","format":"boolean"},"maker_fee":{"type":"string"},"is_maker_fee_enabled":{"type":"boolean","format":"boolean"},"liquidation_fee":{"type":"string"},"min_base_amount":{"type":"string"},"min_quote_amount":{"type":"string"},"order_quote_limit":{"type":"string"},"supported_size_decimals":{"type":"integer","format":"uint8"},"supported_price_decimals":{"type":"integer","format":"uint8"},"supported_quote_decimals":{"type":"integer","format":"uint8"},"created_at":{"type":"string"},"multiplier":{"type":"string"},"start_timestamp":{"type":"integer","format":"int64"},"end_timestamp":{"type":"integer","format":"int64"},"open_interest":{"type":"string"},"outcome":{"type":"integer","format":"int32","enum":[0,1,2]},"operator_account_index":{"type":"integer","format":"int64"},"settlement_cap":{"type":"integer","format":"int32"},"settlement_type":{"type":"integer","format":"int32","enum":[0,1]},"settlement_price":{"type":"integer","format":"int32"},"default_price":{"type":"integer","format":"int32"},"is_frozen":{"type":"boolean","format":"boolean"},"size_decimals":{"type":"integer","format":"uint8"},"price_decimals":{"type":"integer","format":"uint8"},"stats":{"$ref":"#/components/schemas/BinaryOptionMarketStats"}},"title":"EventOrderBookEntry","required":["symbol","market_id","market_type","base_asset_id","quote_asset_id","status","taker_fee","is_taker_fee_enabled","maker_fee","is_maker_fee_enabled","liquidation_fee","min_base_amount","min_quote_amount","order_quote_limit","supported_size_decimals","supported_price_decimals","supported_quote_decimals","created_at","multiplier","start_timestamp","end_timestamp","open_interest","outcome","operator_account_index","settlement_cap","settlement_type","settlement_price","default_price","is_frozen","size_decimals","price_decimals","stats"]},"BinaryOptionMarketStats":{"type":"object","properties":{"symbol":{"type":"string"},"market_id":{"type":"integer","format":"int64"},"mid_price":{"type":"string"},"best_ask_price":{"type":"string"},"best_bid_price":{"type":"string"},"last_trade_price":{"type":"string"},"daily_base_token_volume":{"type":"number","format":"double"},"daily_quote_token_volume":{"type":"number","format":"double"},"daily_price_low":{"type":"number","format":"double"},"daily_price_high":{"type":"number","format":"double"},"daily_price_change":{"type":"number","format":"double"},"lifetime_quote_token_volume":{"type":"number","format":"double"},"lifetime_base_token_volume":{"type":"number","format":"double","description":" outcome shares traded over the market's life"},"open_interest":{"type":"string"},"status":{"type":"string","enum":["inactive","active","waiting-for-settlement","in-settlement","settled"],"description":" inactive before the trading window opens, waiting-for-settlement once it closes"},"outcome":{"type":"integer","format":"int32","enum":[0,1,2]}},"title":"BinaryOptionMarketStats","required":["symbol","market_id","mid_price","best_ask_price","best_bid_price","last_trade_price","daily_base_token_volume","daily_quote_token_volume","daily_price_low","daily_price_high","daily_price_change","lifetime_quote_token_volume","lifetime_base_token_volume","open_interest","status","outcome"]}}}}
```

## The BinaryOptionMarketStats object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"BinaryOptionMarketStats":{"type":"object","properties":{"symbol":{"type":"string"},"market_id":{"type":"integer","format":"int64"},"mid_price":{"type":"string"},"best_ask_price":{"type":"string"},"best_bid_price":{"type":"string"},"last_trade_price":{"type":"string"},"daily_base_token_volume":{"type":"number","format":"double"},"daily_quote_token_volume":{"type":"number","format":"double"},"daily_price_low":{"type":"number","format":"double"},"daily_price_high":{"type":"number","format":"double"},"daily_price_change":{"type":"number","format":"double"},"lifetime_quote_token_volume":{"type":"number","format":"double"},"lifetime_base_token_volume":{"type":"number","format":"double","description":" outcome shares traded over the market's life"},"open_interest":{"type":"string"},"status":{"type":"string","enum":["inactive","active","waiting-for-settlement","in-settlement","settled"],"description":" inactive before the trading window opens, waiting-for-settlement once it closes"},"outcome":{"type":"integer","format":"int32","enum":[0,1,2]}},"title":"BinaryOptionMarketStats","required":["symbol","market_id","mid_price","best_ask_price","best_bid_price","last_trade_price","daily_base_token_volume","daily_quote_token_volume","daily_price_low","daily_price_high","daily_price_change","lifetime_quote_token_volume","lifetime_base_token_volume","open_interest","status","outcome"]}}}}
```

## The handler.SearchResult object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"handler.SearchResult":{"type":"object","required":["type"],"properties":{"account_assets":{"$ref":"#/components/schemas/response.AccountAssetResponse"},"account_logs":{"type":"array","items":{"$ref":"#/components/schemas/response.Tx"}},"account_positions":{"$ref":"#/components/schemas/response.AccountPositionResponse"},"batch":{"$ref":"#/components/schemas/response.Batch"},"block":{"$ref":"#/components/schemas/response.Block"},"log":{"$ref":"#/components/schemas/response.TxDetailed"},"type":{"$ref":"#/components/schemas/handler.SearchResultType"}}},"response.AccountAssetResponse":{"type":"object","properties":{"assets":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/response.EnrichedAccountAsset"}}},"required":["assets"]},"response.EnrichedAccountAsset":{"type":"object","properties":{"asset_id":{"type":"integer"},"balance":{"type":"string"},"locked_balance":{"type":"string"},"symbol":{"type":"string"}},"required":["asset_id","balance","locked_balance","symbol"]},"response.Tx":{"type":"object","properties":{"hash":{"type":"string"},"pubdata":{"$ref":"#/components/schemas/response.PubData"},"pubdata_type":{"$ref":"#/components/schemas/response.PubDataType"},"status":{"allOf":[{"$ref":"#/components/schemas/response.BatchStatus"}],"nullable":true},"time":{"type":"string"},"tx_type":{"$ref":"#/components/schemas/response.TxType"}},"required":["hash","pubdata","pubdata_type","status","time","tx_type"]},"response.PubData":{"type":"object","properties":{"burned_shares_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.BurnedSharesPubData"}],"nullable":true},"deleverage_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.DeleveragePubData"}],"nullable":true},"deleverage_pubdata_with_funding":{"allOf":[{"$ref":"#/components/schemas/response.DeleveragePubDataWithFunding"}],"nullable":true},"executed_pending_unlock_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.ExecutedPendingUnlockPubData"}],"nullable":true},"exit_position_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.ExitPositionPubData"}],"nullable":true},"exit_position_pubdata_with_funding":{"allOf":[{"$ref":"#/components/schemas/response.ExitPositionPubDataWithFunding"}],"nullable":true},"l1_create_market_pubdata":{"allOf":[{"$ref":"#/components/schemas/types.L1CreateMarketPubData"}],"nullable":true},"l1_create_market_pubdata_v2":{"allOf":[{"$ref":"#/components/schemas/types.L1CreateMarketPubDataV2"}],"nullable":true},"l1_create_spot_market_pubdata":{"allOf":[{"$ref":"#/components/schemas/types.L1CreateSpotMarketPubData"}],"nullable":true},"l1_deposit_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.L1DepositPubData"}],"nullable":true},"l1_deposit_pubdata_v2":{"allOf":[{"$ref":"#/components/schemas/response.L1DepositPubDataV2"}],"nullable":true},"l1_register_asset_pubdata":{"allOf":[{"$ref":"#/components/schemas/types.L1RegisterAssetPubData"}],"nullable":true},"l1_set_system_config_pubdata":{"allOf":[{"$ref":"#/components/schemas/types.L1SetSystemConfigPubData"}],"nullable":true},"l1_update_asset_pubdata":{"allOf":[{"$ref":"#/components/schemas/types.L1UpdateAssetPubData"}],"nullable":true},"l1_update_market_pubdata":{"allOf":[{"$ref":"#/components/schemas/types.L1UpdateMarketPubData"}],"nullable":true},"l1_update_spot_market_pubdata":{"allOf":[{"$ref":"#/components/schemas/types.L1UpdateSpotMarketPubData"}],"nullable":true},"l2_create_public_pool_pubdata":{"allOf":[{"$ref":"#/components/schemas/types.L2CreatePublicPoolPubData"}],"nullable":true},"l2_create_staking_pool_pubdata":{"allOf":[{"$ref":"#/components/schemas/types.L2CreateStakingPoolPubData"}],"nullable":true},"l2_create_sub_account_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.L2CreateSubAccountPubData"}],"nullable":true},"l2_mint_shares_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.L2MintSharesPubData"}],"nullable":true},"l2_stake_assets_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.L2StakeAssetsPubData"}],"nullable":true},"l2_transfer_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.L2TransferPubData"}],"nullable":true},"l2_transfer_pubdata_v2":{"allOf":[{"$ref":"#/components/schemas/response.L2TransferPubDataV2"}],"nullable":true},"l2_update_account_config_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.L2UpdateAccountConfigPubData"}],"nullable":true},"l2_update_leverage_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.L2UpdateLeveragePubData"}],"nullable":true},"l2_update_margin_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.L2UpdateMarginPubData"}],"nullable":true},"l2_update_public_pool_pubdata":{"allOf":[{"$ref":"#/components/schemas/types.L2UpdatePublicPoolPubData"}],"nullable":true},"trade_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.TradePubData"}],"nullable":true},"trade_pubdata_with_funding":{"allOf":[{"$ref":"#/components/schemas/response.TradePubDataWithFunding"}],"nullable":true},"unstake_assets_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.UnstakeAssetsPubData"}],"nullable":true},"withdraw_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.WithdrawPubData"}],"nullable":true},"withdraw_pubdata_v2":{"allOf":[{"$ref":"#/components/schemas/response.WithdrawPubDataV2"}],"nullable":true}},"required":["burned_shares_pubdata","deleverage_pubdata","deleverage_pubdata_with_funding","executed_pending_unlock_pubdata","exit_position_pubdata","exit_position_pubdata_with_funding","l1_create_market_pubdata","l1_create_market_pubdata_v2","l1_create_spot_market_pubdata","l1_deposit_pubdata","l1_deposit_pubdata_v2","l1_register_asset_pubdata","l1_set_system_config_pubdata","l1_update_asset_pubdata","l1_update_market_pubdata","l1_update_spot_market_pubdata","l2_create_public_pool_pubdata","l2_create_staking_pool_pubdata","l2_create_sub_account_pubdata","l2_mint_shares_pubdata","l2_stake_assets_pubdata","l2_transfer_pubdata","l2_transfer_pubdata_v2","l2_update_account_config_pubdata","l2_update_leverage_pubdata","l2_update_margin_pubdata","l2_update_public_pool_pubdata","trade_pubdata","trade_pubdata_with_funding","unstake_assets_pubdata","withdraw_pubdata","withdraw_pubdata_v2"]},"response.BurnedSharesPubData":{"type":"object","properties":{"account_index":{"type":"string"},"operator_fee_share_amount":{"type":"string"},"public_pool_index":{"type":"integer"},"shares_to_burn":{"type":"string"},"shares_to_burn_usdc":{"type":"string"}},"required":["account_index","operator_fee_share_amount","public_pool_index","shares_to_burn","shares_to_burn_usdc"]},"response.DeleveragePubData":{"type":"object","properties":{"bankrupt_account_index":{"type":"string"},"deleverager_account_index":{"type":"string"},"is_taker_ask":{"type":"integer"},"market_index":{"type":"integer"},"quote":{"type":"string"},"size":{"type":"string"}},"required":["bankrupt_account_index","deleverager_account_index","is_taker_ask","market_index","quote","size"]},"response.DeleveragePubDataWithFunding":{"type":"object","properties":{"bankrupt_account_index":{"type":"string"},"deleverager_account_index":{"type":"string"},"funding_rate_prefix_sum":{"description":"FundingPubData","type":"integer"},"is_taker_ask":{"type":"integer"},"market_index":{"type":"integer"},"quote":{"type":"string"},"size":{"type":"string"}},"required":["bankrupt_account_index","deleverager_account_index","funding_rate_prefix_sum","is_taker_ask","market_index","quote","size"]},"response.ExecutedPendingUnlockPubData":{"type":"object","properties":{"account_index":{"type":"string"},"amount":{"type":"string"},"asset_symbol":{"type":"string"}},"required":["account_index","amount","asset_symbol"]},"response.ExitPositionPubData":{"type":"object","properties":{"account_index":{"type":"string"},"market_index":{"type":"integer"},"settlement_price":{"type":"string"}},"required":["account_index","market_index","settlement_price"]},"response.ExitPositionPubDataWithFunding":{"type":"object","properties":{"account_index":{"type":"string"},"funding_rate_prefix_sum":{"description":"FundingPubData","type":"integer"},"market_index":{"type":"integer"},"settlement_price":{"type":"string"}},"required":["account_index","funding_rate_prefix_sum","market_index","settlement_price"]},"types.L1CreateMarketPubData":{"type":"object","properties":{"close_out_margin_fraction":{"type":"integer"},"default_initial_margin_fraction":{"type":"integer"},"interest_rate":{"type":"integer"},"liquidation_fee":{"type":"integer"},"maintenance_margin_fraction":{"type":"integer"},"maker_fee":{"type":"integer"},"market_index":{"type":"integer"},"min_base_amount":{"type":"integer"},"min_initial_margin_fraction":{"type":"integer"},"min_quote_amount":{"type":"integer"},"quote_multiplier":{"type":"integer"},"taker_fee":{"type":"integer"}},"required":["close_out_margin_fraction","default_initial_margin_fraction","interest_rate","liquidation_fee","maintenance_margin_fraction","maker_fee","market_index","min_base_amount","min_initial_margin_fraction","min_quote_amount","quote_multiplier","taker_fee"]},"types.L1CreateMarketPubDataV2":{"type":"object","properties":{"close_out_margin_fraction":{"type":"integer"},"default_initial_margin_fraction":{"type":"integer"},"funding_clamp_big":{"type":"integer"},"funding_clamp_small":{"type":"integer"},"interest_rate":{"type":"integer"},"liquidation_fee":{"type":"integer"},"maintenance_margin_fraction":{"type":"integer"},"maker_fee":{"type":"integer"},"market_index":{"type":"integer"},"min_base_amount":{"type":"integer"},"min_initial_margin_fraction":{"type":"integer"},"min_quote_amount":{"type":"integer"},"open_interest_limit":{"type":"integer"},"order_quote_limit":{"type":"integer"},"quote_multiplier":{"type":"integer"},"taker_fee":{"type":"integer"}},"required":["close_out_margin_fraction","default_initial_margin_fraction","funding_clamp_big","funding_clamp_small","interest_rate","liquidation_fee","maintenance_margin_fraction","maker_fee","market_index","min_base_amount","min_initial_margin_fraction","min_quote_amount","open_interest_limit","order_quote_limit","quote_multiplier","taker_fee"]},"types.L1CreateSpotMarketPubData":{"type":"object","properties":{"base_asset_id":{"type":"integer"},"maker_fee":{"type":"integer"},"market_index":{"type":"integer"},"min_base_amount":{"type":"integer"},"min_quote_amount":{"type":"integer"},"order_quote_limit":{"type":"integer"},"quote_asset_id":{"type":"integer"},"quote_extension_multiplier":{"type":"integer"},"size_extension_multiplier":{"type":"integer"},"taker_fee":{"type":"integer"}},"required":["base_asset_id","maker_fee","market_index","min_base_amount","min_quote_amount","order_quote_limit","quote_asset_id","quote_extension_multiplier","size_extension_multiplier","taker_fee"]},"response.L1DepositPubData":{"type":"object","properties":{"account_index":{"type":"string"},"l1_address":{"type":"string"},"usdc_amount":{"type":"string"}},"required":["account_index","l1_address","usdc_amount"]},"response.L1DepositPubDataV2":{"type":"object","properties":{"accepted_amount":{"type":"string"},"account_index":{"type":"string"},"asset_index":{"type":"string"},"l1_address":{"type":"string"},"route_type":{"type":"string"}},"required":["accepted_amount","account_index","asset_index","l1_address","route_type"]},"types.L1RegisterAssetPubData":{"type":"object","properties":{"asset_index":{"type":"integer"},"extension_multiplier":{"type":"integer"},"margin_mode":{"type":"integer"},"min_transfer_amount":{"type":"integer"},"min_withdrawal_amount":{"type":"integer"}},"required":["asset_index","extension_multiplier","margin_mode","min_transfer_amount","min_withdrawal_amount"]},"types.L1SetSystemConfigPubData":{"type":"object","properties":{"liquidity_pool_cooldown_period":{"type":"integer"},"liquidity_pool_index":{"type":"integer"},"max_integrator_perps_maker_fee":{"type":"integer"},"max_integrator_perps_taker_fee":{"type":"integer"},"max_integrator_spot_maker_fee":{"type":"integer"},"max_integrator_spot_taker_fee":{"type":"integer"},"staking_pool_index":{"type":"integer"},"staking_pool_lockup_period":{"type":"integer"}},"required":["liquidity_pool_cooldown_period","liquidity_pool_index","max_integrator_perps_maker_fee","max_integrator_perps_taker_fee","max_integrator_spot_maker_fee","max_integrator_spot_taker_fee","staking_pool_index","staking_pool_lockup_period"]},"types.L1UpdateAssetPubData":{"type":"object","properties":{"asset_index":{"type":"integer"},"margin_mode":{"type":"integer"},"min_transfer_amount":{"type":"integer"},"min_withdrawal_amount":{"type":"integer"}},"required":["asset_index","margin_mode","min_transfer_amount","min_withdrawal_amount"]},"types.L1UpdateMarketPubData":{"type":"object","properties":{"close_out_margin_fraction":{"type":"integer"},"default_initial_margin_fraction":{"type":"integer"},"interest_rate":{"type":"integer"},"liquidation_fee":{"type":"integer"},"maintenance_margin_fraction":{"type":"integer"},"maker_fee":{"type":"integer"},"market_index":{"type":"integer"},"min_base_amount":{"type":"integer"},"min_initial_margin_fraction":{"type":"integer"},"min_quote_amount":{"type":"integer"},"status":{"type":"integer"},"taker_fee":{"type":"integer"}},"required":["close_out_margin_fraction","default_initial_margin_fraction","interest_rate","liquidation_fee","maintenance_margin_fraction","maker_fee","market_index","min_base_amount","min_initial_margin_fraction","min_quote_amount","status","taker_fee"]},"types.L1UpdateSpotMarketPubData":{"type":"object","properties":{"maker_fee":{"type":"integer"},"market_index":{"type":"integer"},"min_base_amount":{"type":"integer"},"min_quote_amount":{"type":"integer"},"order_quote_limit":{"type":"integer"},"status":{"type":"integer"},"taker_fee":{"type":"integer"}},"required":["maker_fee","market_index","min_base_amount","min_quote_amount","order_quote_limit","status","taker_fee"]},"types.L2CreatePublicPoolPubData":{"type":"object","properties":{"account_index":{"type":"integer"},"initial_total_shares":{"type":"integer"},"min_operator_share_rate":{"type":"integer"},"operator_fee":{"type":"integer"},"public_pool_index":{"type":"integer"}},"required":["account_index","initial_total_shares","min_operator_share_rate","operator_fee","public_pool_index"]},"types.L2CreateStakingPoolPubData":{"type":"object","properties":{"account_index":{"type":"integer"},"initial_total_shares":{"type":"integer"},"min_operator_share_rate":{"type":"integer"},"staking_pool_index":{"type":"integer"}},"required":["account_index","initial_total_shares","min_operator_share_rate","staking_pool_index"]},"response.L2CreateSubAccountPubData":{"type":"object","properties":{"account_index":{"type":"string"},"subAccount_index":{"type":"string"}},"required":["account_index","subAccount_index"]},"response.L2MintSharesPubData":{"type":"object","properties":{"account_index":{"type":"string"},"public_pool_index":{"type":"integer"},"share_amount":{"type":"string"},"usdc_amount":{"type":"string"}},"required":["account_index","public_pool_index","share_amount","usdc_amount"]},"response.L2StakeAssetsPubData":{"type":"object","properties":{"account_index":{"type":"string"},"lit_amount":{"type":"string"},"share_amount":{"type":"string"},"staking_pool_index":{"type":"integer"}},"required":["account_index","lit_amount","share_amount","staking_pool_index"]},"response.L2TransferPubData":{"type":"object","properties":{"from_account_index":{"type":"string"},"to_account_index":{"type":"string"},"usdc_amount":{"type":"string"}},"required":["from_account_index","to_account_index","usdc_amount"]},"response.L2TransferPubDataV2":{"type":"object","properties":{"amount":{"type":"string"},"asset_index":{"type":"string"},"fee_account_index":{"type":"string"},"from_account_index":{"type":"string"},"from_route_type":{"type":"string"},"to_account_index":{"type":"string"},"to_route_type":{"type":"string"},"usdc_fee":{"type":"string"}},"required":["amount","asset_index","fee_account_index","from_account_index","from_route_type","to_account_index","to_route_type","usdc_fee"]},"response.L2UpdateAccountConfigPubData":{"type":"object","properties":{"account_index":{"type":"integer"},"account_trading_mode":{"type":"integer"},"asset_amounts":{"type":"array","items":{"$ref":"#/components/schemas/response.UnifiedAsset"}}},"required":["account_index","account_trading_mode","asset_amounts"]},"response.UnifiedAsset":{"type":"object","properties":{"asset_index":{"type":"integer"},"moved_asset_amount":{"type":"string"}},"required":["asset_index","moved_asset_amount"]},"response.L2UpdateLeveragePubData":{"type":"object","properties":{"account_index":{"type":"string"},"initial_margin_fraction":{"type":"integer"},"margin_mode":{"type":"integer"},"market_index":{"type":"integer"}},"required":["account_index","initial_margin_fraction","margin_mode","market_index"]},"response.L2UpdateMarginPubData":{"type":"object","properties":{"account_index":{"type":"string"},"direction":{"type":"integer"},"market_index":{"type":"integer"},"usdc_amount":{"type":"string"}},"required":["account_index","direction","market_index","usdc_amount"]},"types.L2UpdatePublicPoolPubData":{"type":"object","properties":{"min_operator_share_rate":{"type":"integer"},"operator_fee":{"type":"integer"},"public_pool_index":{"type":"integer"},"status":{"type":"integer"}},"required":["min_operator_share_rate","operator_fee","public_pool_index","status"]},"response.TradePubData":{"type":"object","properties":{"fee_account_index":{"type":"string"},"is_taker_ask":{"type":"integer"},"maker_account_index":{"type":"string"},"maker_fee":{"type":"integer"},"market_index":{"type":"integer"},"price":{"type":"string"},"size":{"type":"string"},"taker_account_index":{"type":"string"},"taker_fee":{"type":"integer"},"trade_type":{"type":"integer"}},"required":["fee_account_index","is_taker_ask","maker_account_index","maker_fee","market_index","price","size","taker_account_index","taker_fee","trade_type"]},"response.TradePubDataWithFunding":{"type":"object","properties":{"fee_account_index":{"type":"string"},"funding_rate_prefix_sum":{"type":"integer"},"is_taker_ask":{"type":"integer"},"maker_account_index":{"type":"string"},"maker_fee":{"type":"integer"},"market_index":{"type":"integer"},"price":{"type":"string"},"size":{"type":"string"},"taker_account_index":{"type":"string"},"taker_fee":{"type":"integer"},"trade_type":{"type":"integer"}},"required":["fee_account_index","funding_rate_prefix_sum","is_taker_ask","maker_account_index","maker_fee","market_index","price","size","taker_account_index","taker_fee","trade_type"]},"response.UnstakeAssetsPubData":{"type":"object","properties":{"account_index":{"type":"string"},"lit_amount":{"type":"string"},"share_amount":{"type":"string"},"staking_pool_index":{"type":"integer"}},"required":["account_index","lit_amount","share_amount","staking_pool_index"]},"response.WithdrawPubData":{"type":"object","properties":{"from_account_index":{"type":"string"},"usdc_amount":{"type":"string"}},"required":["from_account_index","usdc_amount"]},"response.WithdrawPubDataV2":{"type":"object","properties":{"amount":{"type":"string"},"asset_index":{"type":"string"},"from_account_index":{"type":"string"},"route_type":{"type":"string"}},"required":["amount","asset_index","from_account_index","route_type"]},"response.PubDataType":{"type":"string","enum":["Empty","L1Deposit","L1CreateMarket","L1UpdateMarket","L2CreateSubAccount","L2CreatePublicPool","L2UpdatePublicPool","L2MintShares","L2UpdateLeverage","L2UpdateMargin","L2Transfer","Withdraw","Trade","TradeWithFunding","LiquidationTrade","LiquidationTradeWithFunding","BurnedShares","ExitPosition","ExitPositionWithFunding","Deleverage","DeleverageWithFunding","L1RegisterAsset","L1UpdateAsset","L1CreateSpotMarket","L1UpdateSpotMarket","WithdrawV2","L1CreateMarketV2","L1DepositV2","L1UpdateMarketV2","L2TransferV2","L2CreateStakingPool","L2UpdateStakingPool","L2StakeAssets","UnstakeAssets","L1SetSystemConfig","ExecutedPendingUnlock","L2UpdateAccountConfig","L2UpdateMarketConfig"]},"response.BatchStatus":{"type":"string","enum":["nothing_to_execute","committed","verified","executed"]},"response.TxType":{"type":"string","enum":["Empty","L1Deposit","L1ChangePubKey","L1CreateMarket","L1UpdateMarket","L1CancelAllOrders","L1Withdraw","L1CreateOrder","L2ChangePubKey","L2CreateSubAccount","L2CreatePublicPool","L2UpdatePublicPool","L2Transfer","L2Withdraw","L2CreateOrder","L2CancelOrder","L2CancelAllOrders","L2ModifyOrder","L2MintShares","L2BurnShares","L2UpdateLeverage","InternalClaimOrder","InternalCancelOrder","InternalDeleverage","InternalExitPosition","InternalCancelAllOrders","InternalLiquidatePosition","InternalCreateOrder","L2CreateGroupedOrders","L2UpdateMargin","L1BurnShares","L1RegisterAsset","L1UpdateAsset","L2CreateStakingPool","L2StakeAssets","L2UnstakeAssets","L1UnstakeAssets","L1SetSystemConfig","InternalPendingUnlock","L2ForceBurnShares","L2UpdateAccountConfig","L2StrategyTransfer","L2UpdateMarketConfig","InternalTransfer","L2ApproveIntegrator"]},"response.AccountPositionResponse":{"type":"object","properties":{"positions":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/response.EnrichedAccountPosition"}}},"required":["positions"]},"response.EnrichedAccountPosition":{"type":"object","properties":{"entry_price":{"type":"string"},"market_index":{"type":"integer"},"pnl":{"type":"string"},"side":{"$ref":"#/components/schemas/response.PositionSide"},"size":{"type":"string"}},"required":["entry_price","market_index","pnl","side","size"]},"response.PositionSide":{"type":"string","enum":["short","long"]},"response.Batch":{"type":"object","properties":{"batch_details":{"allOf":[{"$ref":"#/components/schemas/response.BatchDetails"}],"nullable":true},"batch_number":{"type":"integer"},"blocks":{"description":"includes all blocks in the batch","type":"array","items":{"$ref":"#/components/schemas/response.BlockMeta"}},"status_changes":{"type":"array","items":{"$ref":"#/components/schemas/response.BatchStatusChange"}},"updated_at":{"type":"string"}},"required":["batch_details","batch_number","blocks","status_changes","updated_at"]},"response.BatchDetails":{"type":"object","properties":{"commit_tx_hash":{"type":"string","nullable":true},"execute_tx_hash":{"type":"string","nullable":true},"verify_tx_hash":{"type":"string","nullable":true}},"required":["commit_tx_hash","execute_tx_hash","verify_tx_hash"]},"response.BlockMeta":{"type":"object","properties":{"block_number":{"type":"integer"},"total_transactions":{"type":"integer"},"updated_at":{"type":"string"}},"required":["block_number","total_transactions","updated_at"]},"response.BatchStatusChange":{"type":"object","properties":{"batch_status":{"$ref":"#/components/schemas/response.BatchStatus"},"hash":{"type":"string"},"updated_at":{"type":"string"}},"required":["batch_status","hash","updated_at"]},"response.Block":{"type":"object","properties":{"batch_details":{"allOf":[{"$ref":"#/components/schemas/response.BatchDetails"}],"nullable":true},"batch_number":{"type":"integer"},"batch_status":{"$ref":"#/components/schemas/response.BatchStatus"},"batch_status_time":{"type":"string"},"block_number":{"type":"integer"},"logs":{"type":"array","items":{"$ref":"#/components/schemas/response.Tx"}},"markets":{"description":"MarketState at Block rollup time","type":"array","items":{"$ref":"#/components/schemas/response.MarketStat"}},"total_transactions":{"type":"integer"}},"required":["batch_details","batch_number","batch_status","batch_status_time","block_number","logs","markets","total_transactions"]},"response.MarketStat":{"type":"object","properties":{"index_price":{"type":"string"},"last_funding_rate":{"type":"string"},"market_index":{"type":"integer"},"market_price":{"type":"string"},"open_interest":{"type":"string"}},"required":["index_price","last_funding_rate","market_index","market_price","open_interest"]},"response.TxDetailed":{"type":"object","properties":{"batch_number":{"type":"integer","nullable":true},"block_number":{"type":"integer"},"hash":{"type":"string"},"pubdata":{"$ref":"#/components/schemas/response.PubData"},"pubdata_type":{"$ref":"#/components/schemas/response.PubDataType"},"status":{"allOf":[{"$ref":"#/components/schemas/response.BatchStatus"}],"nullable":true},"time":{"type":"string"},"tx_type":{"$ref":"#/components/schemas/response.TxType"}},"required":["batch_number","block_number","hash","pubdata","pubdata_type","status","time","tx_type"]},"handler.SearchResultType":{"type":"string","enum":["account","block","batch","log"]}}}}
```

## The handler.SearchResultType object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"handler.SearchResultType":{"type":"string","enum":["account","block","batch","log"]}}}}
```

## The response.AccountAssetResponse object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"response.AccountAssetResponse":{"type":"object","properties":{"assets":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/response.EnrichedAccountAsset"}}},"required":["assets"]},"response.EnrichedAccountAsset":{"type":"object","properties":{"asset_id":{"type":"integer"},"balance":{"type":"string"},"locked_balance":{"type":"string"},"symbol":{"type":"string"}},"required":["asset_id","balance","locked_balance","symbol"]}}}}
```

## The response.AccountPositionResponse object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"response.AccountPositionResponse":{"type":"object","properties":{"positions":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/response.EnrichedAccountPosition"}}},"required":["positions"]},"response.EnrichedAccountPosition":{"type":"object","properties":{"entry_price":{"type":"string"},"market_index":{"type":"integer"},"pnl":{"type":"string"},"side":{"$ref":"#/components/schemas/response.PositionSide"},"size":{"type":"string"}},"required":["entry_price","market_index","pnl","side","size"]},"response.PositionSide":{"type":"string","enum":["short","long"]}}}}
```

## The response.Batch object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"response.Batch":{"type":"object","properties":{"batch_details":{"allOf":[{"$ref":"#/components/schemas/response.BatchDetails"}],"nullable":true},"batch_number":{"type":"integer"},"blocks":{"description":"includes all blocks in the batch","type":"array","items":{"$ref":"#/components/schemas/response.BlockMeta"}},"status_changes":{"type":"array","items":{"$ref":"#/components/schemas/response.BatchStatusChange"}},"updated_at":{"type":"string"}},"required":["batch_details","batch_number","blocks","status_changes","updated_at"]},"response.BatchDetails":{"type":"object","properties":{"commit_tx_hash":{"type":"string","nullable":true},"execute_tx_hash":{"type":"string","nullable":true},"verify_tx_hash":{"type":"string","nullable":true}},"required":["commit_tx_hash","execute_tx_hash","verify_tx_hash"]},"response.BlockMeta":{"type":"object","properties":{"block_number":{"type":"integer"},"total_transactions":{"type":"integer"},"updated_at":{"type":"string"}},"required":["block_number","total_transactions","updated_at"]},"response.BatchStatusChange":{"type":"object","properties":{"batch_status":{"$ref":"#/components/schemas/response.BatchStatus"},"hash":{"type":"string"},"updated_at":{"type":"string"}},"required":["batch_status","hash","updated_at"]},"response.BatchStatus":{"type":"string","enum":["nothing_to_execute","committed","verified","executed"]}}}}
```

## The response.BatchDetails object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"response.BatchDetails":{"type":"object","properties":{"commit_tx_hash":{"type":"string","nullable":true},"execute_tx_hash":{"type":"string","nullable":true},"verify_tx_hash":{"type":"string","nullable":true}},"required":["commit_tx_hash","execute_tx_hash","verify_tx_hash"]}}}}
```

## The response.BatchStatus object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"response.BatchStatus":{"type":"string","enum":["nothing_to_execute","committed","verified","executed"]}}}}
```

## The response.BatchStatusChange object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"response.BatchStatusChange":{"type":"object","properties":{"batch_status":{"$ref":"#/components/schemas/response.BatchStatus"},"hash":{"type":"string"},"updated_at":{"type":"string"}},"required":["batch_status","hash","updated_at"]},"response.BatchStatus":{"type":"string","enum":["nothing_to_execute","committed","verified","executed"]}}}}
```

## The response.Block object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"response.Block":{"type":"object","properties":{"batch_details":{"allOf":[{"$ref":"#/components/schemas/response.BatchDetails"}],"nullable":true},"batch_number":{"type":"integer"},"batch_status":{"$ref":"#/components/schemas/response.BatchStatus"},"batch_status_time":{"type":"string"},"block_number":{"type":"integer"},"logs":{"type":"array","items":{"$ref":"#/components/schemas/response.Tx"}},"markets":{"description":"MarketState at Block rollup time","type":"array","items":{"$ref":"#/components/schemas/response.MarketStat"}},"total_transactions":{"type":"integer"}},"required":["batch_details","batch_number","batch_status","batch_status_time","block_number","logs","markets","total_transactions"]},"response.BatchDetails":{"type":"object","properties":{"commit_tx_hash":{"type":"string","nullable":true},"execute_tx_hash":{"type":"string","nullable":true},"verify_tx_hash":{"type":"string","nullable":true}},"required":["commit_tx_hash","execute_tx_hash","verify_tx_hash"]},"response.BatchStatus":{"type":"string","enum":["nothing_to_execute","committed","verified","executed"]},"response.Tx":{"type":"object","properties":{"hash":{"type":"string"},"pubdata":{"$ref":"#/components/schemas/response.PubData"},"pubdata_type":{"$ref":"#/components/schemas/response.PubDataType"},"status":{"allOf":[{"$ref":"#/components/schemas/response.BatchStatus"}],"nullable":true},"time":{"type":"string"},"tx_type":{"$ref":"#/components/schemas/response.TxType"}},"required":["hash","pubdata","pubdata_type","status","time","tx_type"]},"response.PubData":{"type":"object","properties":{"burned_shares_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.BurnedSharesPubData"}],"nullable":true},"deleverage_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.DeleveragePubData"}],"nullable":true},"deleverage_pubdata_with_funding":{"allOf":[{"$ref":"#/components/schemas/response.DeleveragePubDataWithFunding"}],"nullable":true},"executed_pending_unlock_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.ExecutedPendingUnlockPubData"}],"nullable":true},"exit_position_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.ExitPositionPubData"}],"nullable":true},"exit_position_pubdata_with_funding":{"allOf":[{"$ref":"#/components/schemas/response.ExitPositionPubDataWithFunding"}],"nullable":true},"l1_create_market_pubdata":{"allOf":[{"$ref":"#/components/schemas/types.L1CreateMarketPubData"}],"nullable":true},"l1_create_market_pubdata_v2":{"allOf":[{"$ref":"#/components/schemas/types.L1CreateMarketPubDataV2"}],"nullable":true},"l1_create_spot_market_pubdata":{"allOf":[{"$ref":"#/components/schemas/types.L1CreateSpotMarketPubData"}],"nullable":true},"l1_deposit_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.L1DepositPubData"}],"nullable":true},"l1_deposit_pubdata_v2":{"allOf":[{"$ref":"#/components/schemas/response.L1DepositPubDataV2"}],"nullable":true},"l1_register_asset_pubdata":{"allOf":[{"$ref":"#/components/schemas/types.L1RegisterAssetPubData"}],"nullable":true},"l1_set_system_config_pubdata":{"allOf":[{"$ref":"#/components/schemas/types.L1SetSystemConfigPubData"}],"nullable":true},"l1_update_asset_pubdata":{"allOf":[{"$ref":"#/components/schemas/types.L1UpdateAssetPubData"}],"nullable":true},"l1_update_market_pubdata":{"allOf":[{"$ref":"#/components/schemas/types.L1UpdateMarketPubData"}],"nullable":true},"l1_update_spot_market_pubdata":{"allOf":[{"$ref":"#/components/schemas/types.L1UpdateSpotMarketPubData"}],"nullable":true},"l2_create_public_pool_pubdata":{"allOf":[{"$ref":"#/components/schemas/types.L2CreatePublicPoolPubData"}],"nullable":true},"l2_create_staking_pool_pubdata":{"allOf":[{"$ref":"#/components/schemas/types.L2CreateStakingPoolPubData"}],"nullable":true},"l2_create_sub_account_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.L2CreateSubAccountPubData"}],"nullable":true},"l2_mint_shares_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.L2MintSharesPubData"}],"nullable":true},"l2_stake_assets_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.L2StakeAssetsPubData"}],"nullable":true},"l2_transfer_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.L2TransferPubData"}],"nullable":true},"l2_transfer_pubdata_v2":{"allOf":[{"$ref":"#/components/schemas/response.L2TransferPubDataV2"}],"nullable":true},"l2_update_account_config_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.L2UpdateAccountConfigPubData"}],"nullable":true},"l2_update_leverage_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.L2UpdateLeveragePubData"}],"nullable":true},"l2_update_margin_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.L2UpdateMarginPubData"}],"nullable":true},"l2_update_public_pool_pubdata":{"allOf":[{"$ref":"#/components/schemas/types.L2UpdatePublicPoolPubData"}],"nullable":true},"trade_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.TradePubData"}],"nullable":true},"trade_pubdata_with_funding":{"allOf":[{"$ref":"#/components/schemas/response.TradePubDataWithFunding"}],"nullable":true},"unstake_assets_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.UnstakeAssetsPubData"}],"nullable":true},"withdraw_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.WithdrawPubData"}],"nullable":true},"withdraw_pubdata_v2":{"allOf":[{"$ref":"#/components/schemas/response.WithdrawPubDataV2"}],"nullable":true}},"required":["burned_shares_pubdata","deleverage_pubdata","deleverage_pubdata_with_funding","executed_pending_unlock_pubdata","exit_position_pubdata","exit_position_pubdata_with_funding","l1_create_market_pubdata","l1_create_market_pubdata_v2","l1_create_spot_market_pubdata","l1_deposit_pubdata","l1_deposit_pubdata_v2","l1_register_asset_pubdata","l1_set_system_config_pubdata","l1_update_asset_pubdata","l1_update_market_pubdata","l1_update_spot_market_pubdata","l2_create_public_pool_pubdata","l2_create_staking_pool_pubdata","l2_create_sub_account_pubdata","l2_mint_shares_pubdata","l2_stake_assets_pubdata","l2_transfer_pubdata","l2_transfer_pubdata_v2","l2_update_account_config_pubdata","l2_update_leverage_pubdata","l2_update_margin_pubdata","l2_update_public_pool_pubdata","trade_pubdata","trade_pubdata_with_funding","unstake_assets_pubdata","withdraw_pubdata","withdraw_pubdata_v2"]},"response.BurnedSharesPubData":{"type":"object","properties":{"account_index":{"type":"string"},"operator_fee_share_amount":{"type":"string"},"public_pool_index":{"type":"integer"},"shares_to_burn":{"type":"string"},"shares_to_burn_usdc":{"type":"string"}},"required":["account_index","operator_fee_share_amount","public_pool_index","shares_to_burn","shares_to_burn_usdc"]},"response.DeleveragePubData":{"type":"object","properties":{"bankrupt_account_index":{"type":"string"},"deleverager_account_index":{"type":"string"},"is_taker_ask":{"type":"integer"},"market_index":{"type":"integer"},"quote":{"type":"string"},"size":{"type":"string"}},"required":["bankrupt_account_index","deleverager_account_index","is_taker_ask","market_index","quote","size"]},"response.DeleveragePubDataWithFunding":{"type":"object","properties":{"bankrupt_account_index":{"type":"string"},"deleverager_account_index":{"type":"string"},"funding_rate_prefix_sum":{"description":"FundingPubData","type":"integer"},"is_taker_ask":{"type":"integer"},"market_index":{"type":"integer"},"quote":{"type":"string"},"size":{"type":"string"}},"required":["bankrupt_account_index","deleverager_account_index","funding_rate_prefix_sum","is_taker_ask","market_index","quote","size"]},"response.ExecutedPendingUnlockPubData":{"type":"object","properties":{"account_index":{"type":"string"},"amount":{"type":"string"},"asset_symbol":{"type":"string"}},"required":["account_index","amount","asset_symbol"]},"response.ExitPositionPubData":{"type":"object","properties":{"account_index":{"type":"string"},"market_index":{"type":"integer"},"settlement_price":{"type":"string"}},"required":["account_index","market_index","settlement_price"]},"response.ExitPositionPubDataWithFunding":{"type":"object","properties":{"account_index":{"type":"string"},"funding_rate_prefix_sum":{"description":"FundingPubData","type":"integer"},"market_index":{"type":"integer"},"settlement_price":{"type":"string"}},"required":["account_index","funding_rate_prefix_sum","market_index","settlement_price"]},"types.L1CreateMarketPubData":{"type":"object","properties":{"close_out_margin_fraction":{"type":"integer"},"default_initial_margin_fraction":{"type":"integer"},"interest_rate":{"type":"integer"},"liquidation_fee":{"type":"integer"},"maintenance_margin_fraction":{"type":"integer"},"maker_fee":{"type":"integer"},"market_index":{"type":"integer"},"min_base_amount":{"type":"integer"},"min_initial_margin_fraction":{"type":"integer"},"min_quote_amount":{"type":"integer"},"quote_multiplier":{"type":"integer"},"taker_fee":{"type":"integer"}},"required":["close_out_margin_fraction","default_initial_margin_fraction","interest_rate","liquidation_fee","maintenance_margin_fraction","maker_fee","market_index","min_base_amount","min_initial_margin_fraction","min_quote_amount","quote_multiplier","taker_fee"]},"types.L1CreateMarketPubDataV2":{"type":"object","properties":{"close_out_margin_fraction":{"type":"integer"},"default_initial_margin_fraction":{"type":"integer"},"funding_clamp_big":{"type":"integer"},"funding_clamp_small":{"type":"integer"},"interest_rate":{"type":"integer"},"liquidation_fee":{"type":"integer"},"maintenance_margin_fraction":{"type":"integer"},"maker_fee":{"type":"integer"},"market_index":{"type":"integer"},"min_base_amount":{"type":"integer"},"min_initial_margin_fraction":{"type":"integer"},"min_quote_amount":{"type":"integer"},"open_interest_limit":{"type":"integer"},"order_quote_limit":{"type":"integer"},"quote_multiplier":{"type":"integer"},"taker_fee":{"type":"integer"}},"required":["close_out_margin_fraction","default_initial_margin_fraction","funding_clamp_big","funding_clamp_small","interest_rate","liquidation_fee","maintenance_margin_fraction","maker_fee","market_index","min_base_amount","min_initial_margin_fraction","min_quote_amount","open_interest_limit","order_quote_limit","quote_multiplier","taker_fee"]},"types.L1CreateSpotMarketPubData":{"type":"object","properties":{"base_asset_id":{"type":"integer"},"maker_fee":{"type":"integer"},"market_index":{"type":"integer"},"min_base_amount":{"type":"integer"},"min_quote_amount":{"type":"integer"},"order_quote_limit":{"type":"integer"},"quote_asset_id":{"type":"integer"},"quote_extension_multiplier":{"type":"integer"},"size_extension_multiplier":{"type":"integer"},"taker_fee":{"type":"integer"}},"required":["base_asset_id","maker_fee","market_index","min_base_amount","min_quote_amount","order_quote_limit","quote_asset_id","quote_extension_multiplier","size_extension_multiplier","taker_fee"]},"response.L1DepositPubData":{"type":"object","properties":{"account_index":{"type":"string"},"l1_address":{"type":"string"},"usdc_amount":{"type":"string"}},"required":["account_index","l1_address","usdc_amount"]},"response.L1DepositPubDataV2":{"type":"object","properties":{"accepted_amount":{"type":"string"},"account_index":{"type":"string"},"asset_index":{"type":"string"},"l1_address":{"type":"string"},"route_type":{"type":"string"}},"required":["accepted_amount","account_index","asset_index","l1_address","route_type"]},"types.L1RegisterAssetPubData":{"type":"object","properties":{"asset_index":{"type":"integer"},"extension_multiplier":{"type":"integer"},"margin_mode":{"type":"integer"},"min_transfer_amount":{"type":"integer"},"min_withdrawal_amount":{"type":"integer"}},"required":["asset_index","extension_multiplier","margin_mode","min_transfer_amount","min_withdrawal_amount"]},"types.L1SetSystemConfigPubData":{"type":"object","properties":{"liquidity_pool_cooldown_period":{"type":"integer"},"liquidity_pool_index":{"type":"integer"},"max_integrator_perps_maker_fee":{"type":"integer"},"max_integrator_perps_taker_fee":{"type":"integer"},"max_integrator_spot_maker_fee":{"type":"integer"},"max_integrator_spot_taker_fee":{"type":"integer"},"staking_pool_index":{"type":"integer"},"staking_pool_lockup_period":{"type":"integer"}},"required":["liquidity_pool_cooldown_period","liquidity_pool_index","max_integrator_perps_maker_fee","max_integrator_perps_taker_fee","max_integrator_spot_maker_fee","max_integrator_spot_taker_fee","staking_pool_index","staking_pool_lockup_period"]},"types.L1UpdateAssetPubData":{"type":"object","properties":{"asset_index":{"type":"integer"},"margin_mode":{"type":"integer"},"min_transfer_amount":{"type":"integer"},"min_withdrawal_amount":{"type":"integer"}},"required":["asset_index","margin_mode","min_transfer_amount","min_withdrawal_amount"]},"types.L1UpdateMarketPubData":{"type":"object","properties":{"close_out_margin_fraction":{"type":"integer"},"default_initial_margin_fraction":{"type":"integer"},"interest_rate":{"type":"integer"},"liquidation_fee":{"type":"integer"},"maintenance_margin_fraction":{"type":"integer"},"maker_fee":{"type":"integer"},"market_index":{"type":"integer"},"min_base_amount":{"type":"integer"},"min_initial_margin_fraction":{"type":"integer"},"min_quote_amount":{"type":"integer"},"status":{"type":"integer"},"taker_fee":{"type":"integer"}},"required":["close_out_margin_fraction","default_initial_margin_fraction","interest_rate","liquidation_fee","maintenance_margin_fraction","maker_fee","market_index","min_base_amount","min_initial_margin_fraction","min_quote_amount","status","taker_fee"]},"types.L1UpdateSpotMarketPubData":{"type":"object","properties":{"maker_fee":{"type":"integer"},"market_index":{"type":"integer"},"min_base_amount":{"type":"integer"},"min_quote_amount":{"type":"integer"},"order_quote_limit":{"type":"integer"},"status":{"type":"integer"},"taker_fee":{"type":"integer"}},"required":["maker_fee","market_index","min_base_amount","min_quote_amount","order_quote_limit","status","taker_fee"]},"types.L2CreatePublicPoolPubData":{"type":"object","properties":{"account_index":{"type":"integer"},"initial_total_shares":{"type":"integer"},"min_operator_share_rate":{"type":"integer"},"operator_fee":{"type":"integer"},"public_pool_index":{"type":"integer"}},"required":["account_index","initial_total_shares","min_operator_share_rate","operator_fee","public_pool_index"]},"types.L2CreateStakingPoolPubData":{"type":"object","properties":{"account_index":{"type":"integer"},"initial_total_shares":{"type":"integer"},"min_operator_share_rate":{"type":"integer"},"staking_pool_index":{"type":"integer"}},"required":["account_index","initial_total_shares","min_operator_share_rate","staking_pool_index"]},"response.L2CreateSubAccountPubData":{"type":"object","properties":{"account_index":{"type":"string"},"subAccount_index":{"type":"string"}},"required":["account_index","subAccount_index"]},"response.L2MintSharesPubData":{"type":"object","properties":{"account_index":{"type":"string"},"public_pool_index":{"type":"integer"},"share_amount":{"type":"string"},"usdc_amount":{"type":"string"}},"required":["account_index","public_pool_index","share_amount","usdc_amount"]},"response.L2StakeAssetsPubData":{"type":"object","properties":{"account_index":{"type":"string"},"lit_amount":{"type":"string"},"share_amount":{"type":"string"},"staking_pool_index":{"type":"integer"}},"required":["account_index","lit_amount","share_amount","staking_pool_index"]},"response.L2TransferPubData":{"type":"object","properties":{"from_account_index":{"type":"string"},"to_account_index":{"type":"string"},"usdc_amount":{"type":"string"}},"required":["from_account_index","to_account_index","usdc_amount"]},"response.L2TransferPubDataV2":{"type":"object","properties":{"amount":{"type":"string"},"asset_index":{"type":"string"},"fee_account_index":{"type":"string"},"from_account_index":{"type":"string"},"from_route_type":{"type":"string"},"to_account_index":{"type":"string"},"to_route_type":{"type":"string"},"usdc_fee":{"type":"string"}},"required":["amount","asset_index","fee_account_index","from_account_index","from_route_type","to_account_index","to_route_type","usdc_fee"]},"response.L2UpdateAccountConfigPubData":{"type":"object","properties":{"account_index":{"type":"integer"},"account_trading_mode":{"type":"integer"},"asset_amounts":{"type":"array","items":{"$ref":"#/components/schemas/response.UnifiedAsset"}}},"required":["account_index","account_trading_mode","asset_amounts"]},"response.UnifiedAsset":{"type":"object","properties":{"asset_index":{"type":"integer"},"moved_asset_amount":{"type":"string"}},"required":["asset_index","moved_asset_amount"]},"response.L2UpdateLeveragePubData":{"type":"object","properties":{"account_index":{"type":"string"},"initial_margin_fraction":{"type":"integer"},"margin_mode":{"type":"integer"},"market_index":{"type":"integer"}},"required":["account_index","initial_margin_fraction","margin_mode","market_index"]},"response.L2UpdateMarginPubData":{"type":"object","properties":{"account_index":{"type":"string"},"direction":{"type":"integer"},"market_index":{"type":"integer"},"usdc_amount":{"type":"string"}},"required":["account_index","direction","market_index","usdc_amount"]},"types.L2UpdatePublicPoolPubData":{"type":"object","properties":{"min_operator_share_rate":{"type":"integer"},"operator_fee":{"type":"integer"},"public_pool_index":{"type":"integer"},"status":{"type":"integer"}},"required":["min_operator_share_rate","operator_fee","public_pool_index","status"]},"response.TradePubData":{"type":"object","properties":{"fee_account_index":{"type":"string"},"is_taker_ask":{"type":"integer"},"maker_account_index":{"type":"string"},"maker_fee":{"type":"integer"},"market_index":{"type":"integer"},"price":{"type":"string"},"size":{"type":"string"},"taker_account_index":{"type":"string"},"taker_fee":{"type":"integer"},"trade_type":{"type":"integer"}},"required":["fee_account_index","is_taker_ask","maker_account_index","maker_fee","market_index","price","size","taker_account_index","taker_fee","trade_type"]},"response.TradePubDataWithFunding":{"type":"object","properties":{"fee_account_index":{"type":"string"},"funding_rate_prefix_sum":{"type":"integer"},"is_taker_ask":{"type":"integer"},"maker_account_index":{"type":"string"},"maker_fee":{"type":"integer"},"market_index":{"type":"integer"},"price":{"type":"string"},"size":{"type":"string"},"taker_account_index":{"type":"string"},"taker_fee":{"type":"integer"},"trade_type":{"type":"integer"}},"required":["fee_account_index","funding_rate_prefix_sum","is_taker_ask","maker_account_index","maker_fee","market_index","price","size","taker_account_index","taker_fee","trade_type"]},"response.UnstakeAssetsPubData":{"type":"object","properties":{"account_index":{"type":"string"},"lit_amount":{"type":"string"},"share_amount":{"type":"string"},"staking_pool_index":{"type":"integer"}},"required":["account_index","lit_amount","share_amount","staking_pool_index"]},"response.WithdrawPubData":{"type":"object","properties":{"from_account_index":{"type":"string"},"usdc_amount":{"type":"string"}},"required":["from_account_index","usdc_amount"]},"response.WithdrawPubDataV2":{"type":"object","properties":{"amount":{"type":"string"},"asset_index":{"type":"string"},"from_account_index":{"type":"string"},"route_type":{"type":"string"}},"required":["amount","asset_index","from_account_index","route_type"]},"response.PubDataType":{"type":"string","enum":["Empty","L1Deposit","L1CreateMarket","L1UpdateMarket","L2CreateSubAccount","L2CreatePublicPool","L2UpdatePublicPool","L2MintShares","L2UpdateLeverage","L2UpdateMargin","L2Transfer","Withdraw","Trade","TradeWithFunding","LiquidationTrade","LiquidationTradeWithFunding","BurnedShares","ExitPosition","ExitPositionWithFunding","Deleverage","DeleverageWithFunding","L1RegisterAsset","L1UpdateAsset","L1CreateSpotMarket","L1UpdateSpotMarket","WithdrawV2","L1CreateMarketV2","L1DepositV2","L1UpdateMarketV2","L2TransferV2","L2CreateStakingPool","L2UpdateStakingPool","L2StakeAssets","UnstakeAssets","L1SetSystemConfig","ExecutedPendingUnlock","L2UpdateAccountConfig","L2UpdateMarketConfig"]},"response.TxType":{"type":"string","enum":["Empty","L1Deposit","L1ChangePubKey","L1CreateMarket","L1UpdateMarket","L1CancelAllOrders","L1Withdraw","L1CreateOrder","L2ChangePubKey","L2CreateSubAccount","L2CreatePublicPool","L2UpdatePublicPool","L2Transfer","L2Withdraw","L2CreateOrder","L2CancelOrder","L2CancelAllOrders","L2ModifyOrder","L2MintShares","L2BurnShares","L2UpdateLeverage","InternalClaimOrder","InternalCancelOrder","InternalDeleverage","InternalExitPosition","InternalCancelAllOrders","InternalLiquidatePosition","InternalCreateOrder","L2CreateGroupedOrders","L2UpdateMargin","L1BurnShares","L1RegisterAsset","L1UpdateAsset","L2CreateStakingPool","L2StakeAssets","L2UnstakeAssets","L1UnstakeAssets","L1SetSystemConfig","InternalPendingUnlock","L2ForceBurnShares","L2UpdateAccountConfig","L2StrategyTransfer","L2UpdateMarketConfig","InternalTransfer","L2ApproveIntegrator"]},"response.MarketStat":{"type":"object","properties":{"index_price":{"type":"string"},"last_funding_rate":{"type":"string"},"market_index":{"type":"integer"},"market_price":{"type":"string"},"open_interest":{"type":"string"}},"required":["index_price","last_funding_rate","market_index","market_price","open_interest"]}}}}
```

## The response.BlockMeta object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"response.BlockMeta":{"type":"object","properties":{"block_number":{"type":"integer"},"total_transactions":{"type":"integer"},"updated_at":{"type":"string"}},"required":["block_number","total_transactions","updated_at"]}}}}
```

## The response.BurnedSharesPubData object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"response.BurnedSharesPubData":{"type":"object","properties":{"account_index":{"type":"string"},"operator_fee_share_amount":{"type":"string"},"public_pool_index":{"type":"integer"},"shares_to_burn":{"type":"string"},"shares_to_burn_usdc":{"type":"string"}},"required":["account_index","operator_fee_share_amount","public_pool_index","shares_to_burn","shares_to_burn_usdc"]}}}}
```

## The response.ChartData object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"response.ChartData":{"type":"object","properties":{"data":{"type":"array","items":{"type":"array","items":{"type":"integer"}}},"types":{"type":"array","items":{"type":"string"}}},"required":["data","types"]}}}}
```

## The response.DeleveragePubData object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"response.DeleveragePubData":{"type":"object","properties":{"bankrupt_account_index":{"type":"string"},"deleverager_account_index":{"type":"string"},"is_taker_ask":{"type":"integer"},"market_index":{"type":"integer"},"quote":{"type":"string"},"size":{"type":"string"}},"required":["bankrupt_account_index","deleverager_account_index","is_taker_ask","market_index","quote","size"]}}}}
```

## The response.DeleveragePubDataWithFunding object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"response.DeleveragePubDataWithFunding":{"type":"object","properties":{"bankrupt_account_index":{"type":"string"},"deleverager_account_index":{"type":"string"},"funding_rate_prefix_sum":{"description":"FundingPubData","type":"integer"},"is_taker_ask":{"type":"integer"},"market_index":{"type":"integer"},"quote":{"type":"string"},"size":{"type":"string"}},"required":["bankrupt_account_index","deleverager_account_index","funding_rate_prefix_sum","is_taker_ask","market_index","quote","size"]}}}}
```

## The response.EnrichedAccountAsset object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"response.EnrichedAccountAsset":{"type":"object","properties":{"asset_id":{"type":"integer"},"balance":{"type":"string"},"locked_balance":{"type":"string"},"symbol":{"type":"string"}},"required":["asset_id","balance","locked_balance","symbol"]}}}}
```

## The response.EnrichedAccountPosition object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"response.EnrichedAccountPosition":{"type":"object","properties":{"entry_price":{"type":"string"},"market_index":{"type":"integer"},"pnl":{"type":"string"},"side":{"$ref":"#/components/schemas/response.PositionSide"},"size":{"type":"string"}},"required":["entry_price","market_index","pnl","side","size"]},"response.PositionSide":{"type":"string","enum":["short","long"]}}}}
```

## The response.ExecutedPendingUnlockPubData object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"response.ExecutedPendingUnlockPubData":{"type":"object","properties":{"account_index":{"type":"string"},"amount":{"type":"string"},"asset_symbol":{"type":"string"}},"required":["account_index","amount","asset_symbol"]}}}}
```

## The response.ExitPositionPubData object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"response.ExitPositionPubData":{"type":"object","properties":{"account_index":{"type":"string"},"market_index":{"type":"integer"},"settlement_price":{"type":"string"}},"required":["account_index","market_index","settlement_price"]}}}}
```

## The response.ExitPositionPubDataWithFunding object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"response.ExitPositionPubDataWithFunding":{"type":"object","properties":{"account_index":{"type":"string"},"funding_rate_prefix_sum":{"description":"FundingPubData","type":"integer"},"market_index":{"type":"integer"},"settlement_price":{"type":"string"}},"required":["account_index","funding_rate_prefix_sum","market_index","settlement_price"]}}}}
```

## The response.L1DepositPubData object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"response.L1DepositPubData":{"type":"object","properties":{"account_index":{"type":"string"},"l1_address":{"type":"string"},"usdc_amount":{"type":"string"}},"required":["account_index","l1_address","usdc_amount"]}}}}
```

## The response.L1DepositPubDataV2 object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"response.L1DepositPubDataV2":{"type":"object","properties":{"accepted_amount":{"type":"string"},"account_index":{"type":"string"},"asset_index":{"type":"string"},"l1_address":{"type":"string"},"route_type":{"type":"string"}},"required":["accepted_amount","account_index","asset_index","l1_address","route_type"]}}}}
```

## The response.L2CreateSubAccountPubData object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"response.L2CreateSubAccountPubData":{"type":"object","properties":{"account_index":{"type":"string"},"subAccount_index":{"type":"string"}},"required":["account_index","subAccount_index"]}}}}
```

## The response.L2MintSharesPubData object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"response.L2MintSharesPubData":{"type":"object","properties":{"account_index":{"type":"string"},"public_pool_index":{"type":"integer"},"share_amount":{"type":"string"},"usdc_amount":{"type":"string"}},"required":["account_index","public_pool_index","share_amount","usdc_amount"]}}}}
```

## The response.L2StakeAssetsPubData object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"response.L2StakeAssetsPubData":{"type":"object","properties":{"account_index":{"type":"string"},"lit_amount":{"type":"string"},"share_amount":{"type":"string"},"staking_pool_index":{"type":"integer"}},"required":["account_index","lit_amount","share_amount","staking_pool_index"]}}}}
```

## The response.L2TransferPubData object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"response.L2TransferPubData":{"type":"object","properties":{"from_account_index":{"type":"string"},"to_account_index":{"type":"string"},"usdc_amount":{"type":"string"}},"required":["from_account_index","to_account_index","usdc_amount"]}}}}
```

## The response.L2TransferPubDataV2 object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"response.L2TransferPubDataV2":{"type":"object","properties":{"amount":{"type":"string"},"asset_index":{"type":"string"},"fee_account_index":{"type":"string"},"from_account_index":{"type":"string"},"from_route_type":{"type":"string"},"to_account_index":{"type":"string"},"to_route_type":{"type":"string"},"usdc_fee":{"type":"string"}},"required":["amount","asset_index","fee_account_index","from_account_index","from_route_type","to_account_index","to_route_type","usdc_fee"]}}}}
```

## The response.L2UpdateAccountConfigPubData object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"response.L2UpdateAccountConfigPubData":{"type":"object","properties":{"account_index":{"type":"integer"},"account_trading_mode":{"type":"integer"},"asset_amounts":{"type":"array","items":{"$ref":"#/components/schemas/response.UnifiedAsset"}}},"required":["account_index","account_trading_mode","asset_amounts"]},"response.UnifiedAsset":{"type":"object","properties":{"asset_index":{"type":"integer"},"moved_asset_amount":{"type":"string"}},"required":["asset_index","moved_asset_amount"]}}}}
```

## The response.L2UpdateLeveragePubData object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"response.L2UpdateLeveragePubData":{"type":"object","properties":{"account_index":{"type":"string"},"initial_margin_fraction":{"type":"integer"},"margin_mode":{"type":"integer"},"market_index":{"type":"integer"}},"required":["account_index","initial_margin_fraction","margin_mode","market_index"]}}}}
```

## The response.L2UpdateMarginPubData object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"response.L2UpdateMarginPubData":{"type":"object","properties":{"account_index":{"type":"string"},"direction":{"type":"integer"},"market_index":{"type":"integer"},"usdc_amount":{"type":"string"}},"required":["account_index","direction","market_index","usdc_amount"]}}}}
```

## The response.Market object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"response.Market":{"type":"object","properties":{"market_index":{"type":"integer"},"symbol":{"type":"string"}},"required":["market_index","symbol"]}}}}
```

## The response.MarketStat object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"response.MarketStat":{"type":"object","properties":{"index_price":{"type":"string"},"last_funding_rate":{"type":"string"},"market_index":{"type":"integer"},"market_price":{"type":"string"},"open_interest":{"type":"string"}},"required":["index_price","last_funding_rate","market_index","market_price","open_interest"]}}}}
```

## The response.MarketTx object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"response.MarketTx":{"type":"object","properties":{"hash":{"type":"string"},"pubdata":{"$ref":"#/components/schemas/response.PubData"},"pubdata_type":{"$ref":"#/components/schemas/response.PubDataType"},"time":{"type":"string"},"tx_type":{"$ref":"#/components/schemas/response.TxType"}},"required":["hash","pubdata","pubdata_type","time","tx_type"]},"response.PubData":{"type":"object","properties":{"burned_shares_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.BurnedSharesPubData"}],"nullable":true},"deleverage_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.DeleveragePubData"}],"nullable":true},"deleverage_pubdata_with_funding":{"allOf":[{"$ref":"#/components/schemas/response.DeleveragePubDataWithFunding"}],"nullable":true},"executed_pending_unlock_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.ExecutedPendingUnlockPubData"}],"nullable":true},"exit_position_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.ExitPositionPubData"}],"nullable":true},"exit_position_pubdata_with_funding":{"allOf":[{"$ref":"#/components/schemas/response.ExitPositionPubDataWithFunding"}],"nullable":true},"l1_create_market_pubdata":{"allOf":[{"$ref":"#/components/schemas/types.L1CreateMarketPubData"}],"nullable":true},"l1_create_market_pubdata_v2":{"allOf":[{"$ref":"#/components/schemas/types.L1CreateMarketPubDataV2"}],"nullable":true},"l1_create_spot_market_pubdata":{"allOf":[{"$ref":"#/components/schemas/types.L1CreateSpotMarketPubData"}],"nullable":true},"l1_deposit_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.L1DepositPubData"}],"nullable":true},"l1_deposit_pubdata_v2":{"allOf":[{"$ref":"#/components/schemas/response.L1DepositPubDataV2"}],"nullable":true},"l1_register_asset_pubdata":{"allOf":[{"$ref":"#/components/schemas/types.L1RegisterAssetPubData"}],"nullable":true},"l1_set_system_config_pubdata":{"allOf":[{"$ref":"#/components/schemas/types.L1SetSystemConfigPubData"}],"nullable":true},"l1_update_asset_pubdata":{"allOf":[{"$ref":"#/components/schemas/types.L1UpdateAssetPubData"}],"nullable":true},"l1_update_market_pubdata":{"allOf":[{"$ref":"#/components/schemas/types.L1UpdateMarketPubData"}],"nullable":true},"l1_update_spot_market_pubdata":{"allOf":[{"$ref":"#/components/schemas/types.L1UpdateSpotMarketPubData"}],"nullable":true},"l2_create_public_pool_pubdata":{"allOf":[{"$ref":"#/components/schemas/types.L2CreatePublicPoolPubData"}],"nullable":true},"l2_create_staking_pool_pubdata":{"allOf":[{"$ref":"#/components/schemas/types.L2CreateStakingPoolPubData"}],"nullable":true},"l2_create_sub_account_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.L2CreateSubAccountPubData"}],"nullable":true},"l2_mint_shares_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.L2MintSharesPubData"}],"nullable":true},"l2_stake_assets_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.L2StakeAssetsPubData"}],"nullable":true},"l2_transfer_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.L2TransferPubData"}],"nullable":true},"l2_transfer_pubdata_v2":{"allOf":[{"$ref":"#/components/schemas/response.L2TransferPubDataV2"}],"nullable":true},"l2_update_account_config_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.L2UpdateAccountConfigPubData"}],"nullable":true},"l2_update_leverage_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.L2UpdateLeveragePubData"}],"nullable":true},"l2_update_margin_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.L2UpdateMarginPubData"}],"nullable":true},"l2_update_public_pool_pubdata":{"allOf":[{"$ref":"#/components/schemas/types.L2UpdatePublicPoolPubData"}],"nullable":true},"trade_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.TradePubData"}],"nullable":true},"trade_pubdata_with_funding":{"allOf":[{"$ref":"#/components/schemas/response.TradePubDataWithFunding"}],"nullable":true},"unstake_assets_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.UnstakeAssetsPubData"}],"nullable":true},"withdraw_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.WithdrawPubData"}],"nullable":true},"withdraw_pubdata_v2":{"allOf":[{"$ref":"#/components/schemas/response.WithdrawPubDataV2"}],"nullable":true}},"required":["burned_shares_pubdata","deleverage_pubdata","deleverage_pubdata_with_funding","executed_pending_unlock_pubdata","exit_position_pubdata","exit_position_pubdata_with_funding","l1_create_market_pubdata","l1_create_market_pubdata_v2","l1_create_spot_market_pubdata","l1_deposit_pubdata","l1_deposit_pubdata_v2","l1_register_asset_pubdata","l1_set_system_config_pubdata","l1_update_asset_pubdata","l1_update_market_pubdata","l1_update_spot_market_pubdata","l2_create_public_pool_pubdata","l2_create_staking_pool_pubdata","l2_create_sub_account_pubdata","l2_mint_shares_pubdata","l2_stake_assets_pubdata","l2_transfer_pubdata","l2_transfer_pubdata_v2","l2_update_account_config_pubdata","l2_update_leverage_pubdata","l2_update_margin_pubdata","l2_update_public_pool_pubdata","trade_pubdata","trade_pubdata_with_funding","unstake_assets_pubdata","withdraw_pubdata","withdraw_pubdata_v2"]},"response.BurnedSharesPubData":{"type":"object","properties":{"account_index":{"type":"string"},"operator_fee_share_amount":{"type":"string"},"public_pool_index":{"type":"integer"},"shares_to_burn":{"type":"string"},"shares_to_burn_usdc":{"type":"string"}},"required":["account_index","operator_fee_share_amount","public_pool_index","shares_to_burn","shares_to_burn_usdc"]},"response.DeleveragePubData":{"type":"object","properties":{"bankrupt_account_index":{"type":"string"},"deleverager_account_index":{"type":"string"},"is_taker_ask":{"type":"integer"},"market_index":{"type":"integer"},"quote":{"type":"string"},"size":{"type":"string"}},"required":["bankrupt_account_index","deleverager_account_index","is_taker_ask","market_index","quote","size"]},"response.DeleveragePubDataWithFunding":{"type":"object","properties":{"bankrupt_account_index":{"type":"string"},"deleverager_account_index":{"type":"string"},"funding_rate_prefix_sum":{"description":"FundingPubData","type":"integer"},"is_taker_ask":{"type":"integer"},"market_index":{"type":"integer"},"quote":{"type":"string"},"size":{"type":"string"}},"required":["bankrupt_account_index","deleverager_account_index","funding_rate_prefix_sum","is_taker_ask","market_index","quote","size"]},"response.ExecutedPendingUnlockPubData":{"type":"object","properties":{"account_index":{"type":"string"},"amount":{"type":"string"},"asset_symbol":{"type":"string"}},"required":["account_index","amount","asset_symbol"]},"response.ExitPositionPubData":{"type":"object","properties":{"account_index":{"type":"string"},"market_index":{"type":"integer"},"settlement_price":{"type":"string"}},"required":["account_index","market_index","settlement_price"]},"response.ExitPositionPubDataWithFunding":{"type":"object","properties":{"account_index":{"type":"string"},"funding_rate_prefix_sum":{"description":"FundingPubData","type":"integer"},"market_index":{"type":"integer"},"settlement_price":{"type":"string"}},"required":["account_index","funding_rate_prefix_sum","market_index","settlement_price"]},"types.L1CreateMarketPubData":{"type":"object","properties":{"close_out_margin_fraction":{"type":"integer"},"default_initial_margin_fraction":{"type":"integer"},"interest_rate":{"type":"integer"},"liquidation_fee":{"type":"integer"},"maintenance_margin_fraction":{"type":"integer"},"maker_fee":{"type":"integer"},"market_index":{"type":"integer"},"min_base_amount":{"type":"integer"},"min_initial_margin_fraction":{"type":"integer"},"min_quote_amount":{"type":"integer"},"quote_multiplier":{"type":"integer"},"taker_fee":{"type":"integer"}},"required":["close_out_margin_fraction","default_initial_margin_fraction","interest_rate","liquidation_fee","maintenance_margin_fraction","maker_fee","market_index","min_base_amount","min_initial_margin_fraction","min_quote_amount","quote_multiplier","taker_fee"]},"types.L1CreateMarketPubDataV2":{"type":"object","properties":{"close_out_margin_fraction":{"type":"integer"},"default_initial_margin_fraction":{"type":"integer"},"funding_clamp_big":{"type":"integer"},"funding_clamp_small":{"type":"integer"},"interest_rate":{"type":"integer"},"liquidation_fee":{"type":"integer"},"maintenance_margin_fraction":{"type":"integer"},"maker_fee":{"type":"integer"},"market_index":{"type":"integer"},"min_base_amount":{"type":"integer"},"min_initial_margin_fraction":{"type":"integer"},"min_quote_amount":{"type":"integer"},"open_interest_limit":{"type":"integer"},"order_quote_limit":{"type":"integer"},"quote_multiplier":{"type":"integer"},"taker_fee":{"type":"integer"}},"required":["close_out_margin_fraction","default_initial_margin_fraction","funding_clamp_big","funding_clamp_small","interest_rate","liquidation_fee","maintenance_margin_fraction","maker_fee","market_index","min_base_amount","min_initial_margin_fraction","min_quote_amount","open_interest_limit","order_quote_limit","quote_multiplier","taker_fee"]},"types.L1CreateSpotMarketPubData":{"type":"object","properties":{"base_asset_id":{"type":"integer"},"maker_fee":{"type":"integer"},"market_index":{"type":"integer"},"min_base_amount":{"type":"integer"},"min_quote_amount":{"type":"integer"},"order_quote_limit":{"type":"integer"},"quote_asset_id":{"type":"integer"},"quote_extension_multiplier":{"type":"integer"},"size_extension_multiplier":{"type":"integer"},"taker_fee":{"type":"integer"}},"required":["base_asset_id","maker_fee","market_index","min_base_amount","min_quote_amount","order_quote_limit","quote_asset_id","quote_extension_multiplier","size_extension_multiplier","taker_fee"]},"response.L1DepositPubData":{"type":"object","properties":{"account_index":{"type":"string"},"l1_address":{"type":"string"},"usdc_amount":{"type":"string"}},"required":["account_index","l1_address","usdc_amount"]},"response.L1DepositPubDataV2":{"type":"object","properties":{"accepted_amount":{"type":"string"},"account_index":{"type":"string"},"asset_index":{"type":"string"},"l1_address":{"type":"string"},"route_type":{"type":"string"}},"required":["accepted_amount","account_index","asset_index","l1_address","route_type"]},"types.L1RegisterAssetPubData":{"type":"object","properties":{"asset_index":{"type":"integer"},"extension_multiplier":{"type":"integer"},"margin_mode":{"type":"integer"},"min_transfer_amount":{"type":"integer"},"min_withdrawal_amount":{"type":"integer"}},"required":["asset_index","extension_multiplier","margin_mode","min_transfer_amount","min_withdrawal_amount"]},"types.L1SetSystemConfigPubData":{"type":"object","properties":{"liquidity_pool_cooldown_period":{"type":"integer"},"liquidity_pool_index":{"type":"integer"},"max_integrator_perps_maker_fee":{"type":"integer"},"max_integrator_perps_taker_fee":{"type":"integer"},"max_integrator_spot_maker_fee":{"type":"integer"},"max_integrator_spot_taker_fee":{"type":"integer"},"staking_pool_index":{"type":"integer"},"staking_pool_lockup_period":{"type":"integer"}},"required":["liquidity_pool_cooldown_period","liquidity_pool_index","max_integrator_perps_maker_fee","max_integrator_perps_taker_fee","max_integrator_spot_maker_fee","max_integrator_spot_taker_fee","staking_pool_index","staking_pool_lockup_period"]},"types.L1UpdateAssetPubData":{"type":"object","properties":{"asset_index":{"type":"integer"},"margin_mode":{"type":"integer"},"min_transfer_amount":{"type":"integer"},"min_withdrawal_amount":{"type":"integer"}},"required":["asset_index","margin_mode","min_transfer_amount","min_withdrawal_amount"]},"types.L1UpdateMarketPubData":{"type":"object","properties":{"close_out_margin_fraction":{"type":"integer"},"default_initial_margin_fraction":{"type":"integer"},"interest_rate":{"type":"integer"},"liquidation_fee":{"type":"integer"},"maintenance_margin_fraction":{"type":"integer"},"maker_fee":{"type":"integer"},"market_index":{"type":"integer"},"min_base_amount":{"type":"integer"},"min_initial_margin_fraction":{"type":"integer"},"min_quote_amount":{"type":"integer"},"status":{"type":"integer"},"taker_fee":{"type":"integer"}},"required":["close_out_margin_fraction","default_initial_margin_fraction","interest_rate","liquidation_fee","maintenance_margin_fraction","maker_fee","market_index","min_base_amount","min_initial_margin_fraction","min_quote_amount","status","taker_fee"]},"types.L1UpdateSpotMarketPubData":{"type":"object","properties":{"maker_fee":{"type":"integer"},"market_index":{"type":"integer"},"min_base_amount":{"type":"integer"},"min_quote_amount":{"type":"integer"},"order_quote_limit":{"type":"integer"},"status":{"type":"integer"},"taker_fee":{"type":"integer"}},"required":["maker_fee","market_index","min_base_amount","min_quote_amount","order_quote_limit","status","taker_fee"]},"types.L2CreatePublicPoolPubData":{"type":"object","properties":{"account_index":{"type":"integer"},"initial_total_shares":{"type":"integer"},"min_operator_share_rate":{"type":"integer"},"operator_fee":{"type":"integer"},"public_pool_index":{"type":"integer"}},"required":["account_index","initial_total_shares","min_operator_share_rate","operator_fee","public_pool_index"]},"types.L2CreateStakingPoolPubData":{"type":"object","properties":{"account_index":{"type":"integer"},"initial_total_shares":{"type":"integer"},"min_operator_share_rate":{"type":"integer"},"staking_pool_index":{"type":"integer"}},"required":["account_index","initial_total_shares","min_operator_share_rate","staking_pool_index"]},"response.L2CreateSubAccountPubData":{"type":"object","properties":{"account_index":{"type":"string"},"subAccount_index":{"type":"string"}},"required":["account_index","subAccount_index"]},"response.L2MintSharesPubData":{"type":"object","properties":{"account_index":{"type":"string"},"public_pool_index":{"type":"integer"},"share_amount":{"type":"string"},"usdc_amount":{"type":"string"}},"required":["account_index","public_pool_index","share_amount","usdc_amount"]},"response.L2StakeAssetsPubData":{"type":"object","properties":{"account_index":{"type":"string"},"lit_amount":{"type":"string"},"share_amount":{"type":"string"},"staking_pool_index":{"type":"integer"}},"required":["account_index","lit_amount","share_amount","staking_pool_index"]},"response.L2TransferPubData":{"type":"object","properties":{"from_account_index":{"type":"string"},"to_account_index":{"type":"string"},"usdc_amount":{"type":"string"}},"required":["from_account_index","to_account_index","usdc_amount"]},"response.L2TransferPubDataV2":{"type":"object","properties":{"amount":{"type":"string"},"asset_index":{"type":"string"},"fee_account_index":{"type":"string"},"from_account_index":{"type":"string"},"from_route_type":{"type":"string"},"to_account_index":{"type":"string"},"to_route_type":{"type":"string"},"usdc_fee":{"type":"string"}},"required":["amount","asset_index","fee_account_index","from_account_index","from_route_type","to_account_index","to_route_type","usdc_fee"]},"response.L2UpdateAccountConfigPubData":{"type":"object","properties":{"account_index":{"type":"integer"},"account_trading_mode":{"type":"integer"},"asset_amounts":{"type":"array","items":{"$ref":"#/components/schemas/response.UnifiedAsset"}}},"required":["account_index","account_trading_mode","asset_amounts"]},"response.UnifiedAsset":{"type":"object","properties":{"asset_index":{"type":"integer"},"moved_asset_amount":{"type":"string"}},"required":["asset_index","moved_asset_amount"]},"response.L2UpdateLeveragePubData":{"type":"object","properties":{"account_index":{"type":"string"},"initial_margin_fraction":{"type":"integer"},"margin_mode":{"type":"integer"},"market_index":{"type":"integer"}},"required":["account_index","initial_margin_fraction","margin_mode","market_index"]},"response.L2UpdateMarginPubData":{"type":"object","properties":{"account_index":{"type":"string"},"direction":{"type":"integer"},"market_index":{"type":"integer"},"usdc_amount":{"type":"string"}},"required":["account_index","direction","market_index","usdc_amount"]},"types.L2UpdatePublicPoolPubData":{"type":"object","properties":{"min_operator_share_rate":{"type":"integer"},"operator_fee":{"type":"integer"},"public_pool_index":{"type":"integer"},"status":{"type":"integer"}},"required":["min_operator_share_rate","operator_fee","public_pool_index","status"]},"response.TradePubData":{"type":"object","properties":{"fee_account_index":{"type":"string"},"is_taker_ask":{"type":"integer"},"maker_account_index":{"type":"string"},"maker_fee":{"type":"integer"},"market_index":{"type":"integer"},"price":{"type":"string"},"size":{"type":"string"},"taker_account_index":{"type":"string"},"taker_fee":{"type":"integer"},"trade_type":{"type":"integer"}},"required":["fee_account_index","is_taker_ask","maker_account_index","maker_fee","market_index","price","size","taker_account_index","taker_fee","trade_type"]},"response.TradePubDataWithFunding":{"type":"object","properties":{"fee_account_index":{"type":"string"},"funding_rate_prefix_sum":{"type":"integer"},"is_taker_ask":{"type":"integer"},"maker_account_index":{"type":"string"},"maker_fee":{"type":"integer"},"market_index":{"type":"integer"},"price":{"type":"string"},"size":{"type":"string"},"taker_account_index":{"type":"string"},"taker_fee":{"type":"integer"},"trade_type":{"type":"integer"}},"required":["fee_account_index","funding_rate_prefix_sum","is_taker_ask","maker_account_index","maker_fee","market_index","price","size","taker_account_index","taker_fee","trade_type"]},"response.UnstakeAssetsPubData":{"type":"object","properties":{"account_index":{"type":"string"},"lit_amount":{"type":"string"},"share_amount":{"type":"string"},"staking_pool_index":{"type":"integer"}},"required":["account_index","lit_amount","share_amount","staking_pool_index"]},"response.WithdrawPubData":{"type":"object","properties":{"from_account_index":{"type":"string"},"usdc_amount":{"type":"string"}},"required":["from_account_index","usdc_amount"]},"response.WithdrawPubDataV2":{"type":"object","properties":{"amount":{"type":"string"},"asset_index":{"type":"string"},"from_account_index":{"type":"string"},"route_type":{"type":"string"}},"required":["amount","asset_index","from_account_index","route_type"]},"response.PubDataType":{"type":"string","enum":["Empty","L1Deposit","L1CreateMarket","L1UpdateMarket","L2CreateSubAccount","L2CreatePublicPool","L2UpdatePublicPool","L2MintShares","L2UpdateLeverage","L2UpdateMargin","L2Transfer","Withdraw","Trade","TradeWithFunding","LiquidationTrade","LiquidationTradeWithFunding","BurnedShares","ExitPosition","ExitPositionWithFunding","Deleverage","DeleverageWithFunding","L1RegisterAsset","L1UpdateAsset","L1CreateSpotMarket","L1UpdateSpotMarket","WithdrawV2","L1CreateMarketV2","L1DepositV2","L1UpdateMarketV2","L2TransferV2","L2CreateStakingPool","L2UpdateStakingPool","L2StakeAssets","UnstakeAssets","L1SetSystemConfig","ExecutedPendingUnlock","L2UpdateAccountConfig","L2UpdateMarketConfig"]},"response.TxType":{"type":"string","enum":["Empty","L1Deposit","L1ChangePubKey","L1CreateMarket","L1UpdateMarket","L1CancelAllOrders","L1Withdraw","L1CreateOrder","L2ChangePubKey","L2CreateSubAccount","L2CreatePublicPool","L2UpdatePublicPool","L2Transfer","L2Withdraw","L2CreateOrder","L2CancelOrder","L2CancelAllOrders","L2ModifyOrder","L2MintShares","L2BurnShares","L2UpdateLeverage","InternalClaimOrder","InternalCancelOrder","InternalDeleverage","InternalExitPosition","InternalCancelAllOrders","InternalLiquidatePosition","InternalCreateOrder","L2CreateGroupedOrders","L2UpdateMargin","L1BurnShares","L1RegisterAsset","L1UpdateAsset","L2CreateStakingPool","L2StakeAssets","L2UnstakeAssets","L1UnstakeAssets","L1SetSystemConfig","InternalPendingUnlock","L2ForceBurnShares","L2UpdateAccountConfig","L2StrategyTransfer","L2UpdateMarketConfig","InternalTransfer","L2ApproveIntegrator"]}}}}
```

## The response.PositionSide object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"response.PositionSide":{"type":"string","enum":["short","long"]}}}}
```

## The response.PubData object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"response.PubData":{"type":"object","properties":{"burned_shares_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.BurnedSharesPubData"}],"nullable":true},"deleverage_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.DeleveragePubData"}],"nullable":true},"deleverage_pubdata_with_funding":{"allOf":[{"$ref":"#/components/schemas/response.DeleveragePubDataWithFunding"}],"nullable":true},"executed_pending_unlock_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.ExecutedPendingUnlockPubData"}],"nullable":true},"exit_position_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.ExitPositionPubData"}],"nullable":true},"exit_position_pubdata_with_funding":{"allOf":[{"$ref":"#/components/schemas/response.ExitPositionPubDataWithFunding"}],"nullable":true},"l1_create_market_pubdata":{"allOf":[{"$ref":"#/components/schemas/types.L1CreateMarketPubData"}],"nullable":true},"l1_create_market_pubdata_v2":{"allOf":[{"$ref":"#/components/schemas/types.L1CreateMarketPubDataV2"}],"nullable":true},"l1_create_spot_market_pubdata":{"allOf":[{"$ref":"#/components/schemas/types.L1CreateSpotMarketPubData"}],"nullable":true},"l1_deposit_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.L1DepositPubData"}],"nullable":true},"l1_deposit_pubdata_v2":{"allOf":[{"$ref":"#/components/schemas/response.L1DepositPubDataV2"}],"nullable":true},"l1_register_asset_pubdata":{"allOf":[{"$ref":"#/components/schemas/types.L1RegisterAssetPubData"}],"nullable":true},"l1_set_system_config_pubdata":{"allOf":[{"$ref":"#/components/schemas/types.L1SetSystemConfigPubData"}],"nullable":true},"l1_update_asset_pubdata":{"allOf":[{"$ref":"#/components/schemas/types.L1UpdateAssetPubData"}],"nullable":true},"l1_update_market_pubdata":{"allOf":[{"$ref":"#/components/schemas/types.L1UpdateMarketPubData"}],"nullable":true},"l1_update_spot_market_pubdata":{"allOf":[{"$ref":"#/components/schemas/types.L1UpdateSpotMarketPubData"}],"nullable":true},"l2_create_public_pool_pubdata":{"allOf":[{"$ref":"#/components/schemas/types.L2CreatePublicPoolPubData"}],"nullable":true},"l2_create_staking_pool_pubdata":{"allOf":[{"$ref":"#/components/schemas/types.L2CreateStakingPoolPubData"}],"nullable":true},"l2_create_sub_account_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.L2CreateSubAccountPubData"}],"nullable":true},"l2_mint_shares_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.L2MintSharesPubData"}],"nullable":true},"l2_stake_assets_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.L2StakeAssetsPubData"}],"nullable":true},"l2_transfer_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.L2TransferPubData"}],"nullable":true},"l2_transfer_pubdata_v2":{"allOf":[{"$ref":"#/components/schemas/response.L2TransferPubDataV2"}],"nullable":true},"l2_update_account_config_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.L2UpdateAccountConfigPubData"}],"nullable":true},"l2_update_leverage_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.L2UpdateLeveragePubData"}],"nullable":true},"l2_update_margin_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.L2UpdateMarginPubData"}],"nullable":true},"l2_update_public_pool_pubdata":{"allOf":[{"$ref":"#/components/schemas/types.L2UpdatePublicPoolPubData"}],"nullable":true},"trade_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.TradePubData"}],"nullable":true},"trade_pubdata_with_funding":{"allOf":[{"$ref":"#/components/schemas/response.TradePubDataWithFunding"}],"nullable":true},"unstake_assets_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.UnstakeAssetsPubData"}],"nullable":true},"withdraw_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.WithdrawPubData"}],"nullable":true},"withdraw_pubdata_v2":{"allOf":[{"$ref":"#/components/schemas/response.WithdrawPubDataV2"}],"nullable":true}},"required":["burned_shares_pubdata","deleverage_pubdata","deleverage_pubdata_with_funding","executed_pending_unlock_pubdata","exit_position_pubdata","exit_position_pubdata_with_funding","l1_create_market_pubdata","l1_create_market_pubdata_v2","l1_create_spot_market_pubdata","l1_deposit_pubdata","l1_deposit_pubdata_v2","l1_register_asset_pubdata","l1_set_system_config_pubdata","l1_update_asset_pubdata","l1_update_market_pubdata","l1_update_spot_market_pubdata","l2_create_public_pool_pubdata","l2_create_staking_pool_pubdata","l2_create_sub_account_pubdata","l2_mint_shares_pubdata","l2_stake_assets_pubdata","l2_transfer_pubdata","l2_transfer_pubdata_v2","l2_update_account_config_pubdata","l2_update_leverage_pubdata","l2_update_margin_pubdata","l2_update_public_pool_pubdata","trade_pubdata","trade_pubdata_with_funding","unstake_assets_pubdata","withdraw_pubdata","withdraw_pubdata_v2"]},"response.BurnedSharesPubData":{"type":"object","properties":{"account_index":{"type":"string"},"operator_fee_share_amount":{"type":"string"},"public_pool_index":{"type":"integer"},"shares_to_burn":{"type":"string"},"shares_to_burn_usdc":{"type":"string"}},"required":["account_index","operator_fee_share_amount","public_pool_index","shares_to_burn","shares_to_burn_usdc"]},"response.DeleveragePubData":{"type":"object","properties":{"bankrupt_account_index":{"type":"string"},"deleverager_account_index":{"type":"string"},"is_taker_ask":{"type":"integer"},"market_index":{"type":"integer"},"quote":{"type":"string"},"size":{"type":"string"}},"required":["bankrupt_account_index","deleverager_account_index","is_taker_ask","market_index","quote","size"]},"response.DeleveragePubDataWithFunding":{"type":"object","properties":{"bankrupt_account_index":{"type":"string"},"deleverager_account_index":{"type":"string"},"funding_rate_prefix_sum":{"description":"FundingPubData","type":"integer"},"is_taker_ask":{"type":"integer"},"market_index":{"type":"integer"},"quote":{"type":"string"},"size":{"type":"string"}},"required":["bankrupt_account_index","deleverager_account_index","funding_rate_prefix_sum","is_taker_ask","market_index","quote","size"]},"response.ExecutedPendingUnlockPubData":{"type":"object","properties":{"account_index":{"type":"string"},"amount":{"type":"string"},"asset_symbol":{"type":"string"}},"required":["account_index","amount","asset_symbol"]},"response.ExitPositionPubData":{"type":"object","properties":{"account_index":{"type":"string"},"market_index":{"type":"integer"},"settlement_price":{"type":"string"}},"required":["account_index","market_index","settlement_price"]},"response.ExitPositionPubDataWithFunding":{"type":"object","properties":{"account_index":{"type":"string"},"funding_rate_prefix_sum":{"description":"FundingPubData","type":"integer"},"market_index":{"type":"integer"},"settlement_price":{"type":"string"}},"required":["account_index","funding_rate_prefix_sum","market_index","settlement_price"]},"types.L1CreateMarketPubData":{"type":"object","properties":{"close_out_margin_fraction":{"type":"integer"},"default_initial_margin_fraction":{"type":"integer"},"interest_rate":{"type":"integer"},"liquidation_fee":{"type":"integer"},"maintenance_margin_fraction":{"type":"integer"},"maker_fee":{"type":"integer"},"market_index":{"type":"integer"},"min_base_amount":{"type":"integer"},"min_initial_margin_fraction":{"type":"integer"},"min_quote_amount":{"type":"integer"},"quote_multiplier":{"type":"integer"},"taker_fee":{"type":"integer"}},"required":["close_out_margin_fraction","default_initial_margin_fraction","interest_rate","liquidation_fee","maintenance_margin_fraction","maker_fee","market_index","min_base_amount","min_initial_margin_fraction","min_quote_amount","quote_multiplier","taker_fee"]},"types.L1CreateMarketPubDataV2":{"type":"object","properties":{"close_out_margin_fraction":{"type":"integer"},"default_initial_margin_fraction":{"type":"integer"},"funding_clamp_big":{"type":"integer"},"funding_clamp_small":{"type":"integer"},"interest_rate":{"type":"integer"},"liquidation_fee":{"type":"integer"},"maintenance_margin_fraction":{"type":"integer"},"maker_fee":{"type":"integer"},"market_index":{"type":"integer"},"min_base_amount":{"type":"integer"},"min_initial_margin_fraction":{"type":"integer"},"min_quote_amount":{"type":"integer"},"open_interest_limit":{"type":"integer"},"order_quote_limit":{"type":"integer"},"quote_multiplier":{"type":"integer"},"taker_fee":{"type":"integer"}},"required":["close_out_margin_fraction","default_initial_margin_fraction","funding_clamp_big","funding_clamp_small","interest_rate","liquidation_fee","maintenance_margin_fraction","maker_fee","market_index","min_base_amount","min_initial_margin_fraction","min_quote_amount","open_interest_limit","order_quote_limit","quote_multiplier","taker_fee"]},"types.L1CreateSpotMarketPubData":{"type":"object","properties":{"base_asset_id":{"type":"integer"},"maker_fee":{"type":"integer"},"market_index":{"type":"integer"},"min_base_amount":{"type":"integer"},"min_quote_amount":{"type":"integer"},"order_quote_limit":{"type":"integer"},"quote_asset_id":{"type":"integer"},"quote_extension_multiplier":{"type":"integer"},"size_extension_multiplier":{"type":"integer"},"taker_fee":{"type":"integer"}},"required":["base_asset_id","maker_fee","market_index","min_base_amount","min_quote_amount","order_quote_limit","quote_asset_id","quote_extension_multiplier","size_extension_multiplier","taker_fee"]},"response.L1DepositPubData":{"type":"object","properties":{"account_index":{"type":"string"},"l1_address":{"type":"string"},"usdc_amount":{"type":"string"}},"required":["account_index","l1_address","usdc_amount"]},"response.L1DepositPubDataV2":{"type":"object","properties":{"accepted_amount":{"type":"string"},"account_index":{"type":"string"},"asset_index":{"type":"string"},"l1_address":{"type":"string"},"route_type":{"type":"string"}},"required":["accepted_amount","account_index","asset_index","l1_address","route_type"]},"types.L1RegisterAssetPubData":{"type":"object","properties":{"asset_index":{"type":"integer"},"extension_multiplier":{"type":"integer"},"margin_mode":{"type":"integer"},"min_transfer_amount":{"type":"integer"},"min_withdrawal_amount":{"type":"integer"}},"required":["asset_index","extension_multiplier","margin_mode","min_transfer_amount","min_withdrawal_amount"]},"types.L1SetSystemConfigPubData":{"type":"object","properties":{"liquidity_pool_cooldown_period":{"type":"integer"},"liquidity_pool_index":{"type":"integer"},"max_integrator_perps_maker_fee":{"type":"integer"},"max_integrator_perps_taker_fee":{"type":"integer"},"max_integrator_spot_maker_fee":{"type":"integer"},"max_integrator_spot_taker_fee":{"type":"integer"},"staking_pool_index":{"type":"integer"},"staking_pool_lockup_period":{"type":"integer"}},"required":["liquidity_pool_cooldown_period","liquidity_pool_index","max_integrator_perps_maker_fee","max_integrator_perps_taker_fee","max_integrator_spot_maker_fee","max_integrator_spot_taker_fee","staking_pool_index","staking_pool_lockup_period"]},"types.L1UpdateAssetPubData":{"type":"object","properties":{"asset_index":{"type":"integer"},"margin_mode":{"type":"integer"},"min_transfer_amount":{"type":"integer"},"min_withdrawal_amount":{"type":"integer"}},"required":["asset_index","margin_mode","min_transfer_amount","min_withdrawal_amount"]},"types.L1UpdateMarketPubData":{"type":"object","properties":{"close_out_margin_fraction":{"type":"integer"},"default_initial_margin_fraction":{"type":"integer"},"interest_rate":{"type":"integer"},"liquidation_fee":{"type":"integer"},"maintenance_margin_fraction":{"type":"integer"},"maker_fee":{"type":"integer"},"market_index":{"type":"integer"},"min_base_amount":{"type":"integer"},"min_initial_margin_fraction":{"type":"integer"},"min_quote_amount":{"type":"integer"},"status":{"type":"integer"},"taker_fee":{"type":"integer"}},"required":["close_out_margin_fraction","default_initial_margin_fraction","interest_rate","liquidation_fee","maintenance_margin_fraction","maker_fee","market_index","min_base_amount","min_initial_margin_fraction","min_quote_amount","status","taker_fee"]},"types.L1UpdateSpotMarketPubData":{"type":"object","properties":{"maker_fee":{"type":"integer"},"market_index":{"type":"integer"},"min_base_amount":{"type":"integer"},"min_quote_amount":{"type":"integer"},"order_quote_limit":{"type":"integer"},"status":{"type":"integer"},"taker_fee":{"type":"integer"}},"required":["maker_fee","market_index","min_base_amount","min_quote_amount","order_quote_limit","status","taker_fee"]},"types.L2CreatePublicPoolPubData":{"type":"object","properties":{"account_index":{"type":"integer"},"initial_total_shares":{"type":"integer"},"min_operator_share_rate":{"type":"integer"},"operator_fee":{"type":"integer"},"public_pool_index":{"type":"integer"}},"required":["account_index","initial_total_shares","min_operator_share_rate","operator_fee","public_pool_index"]},"types.L2CreateStakingPoolPubData":{"type":"object","properties":{"account_index":{"type":"integer"},"initial_total_shares":{"type":"integer"},"min_operator_share_rate":{"type":"integer"},"staking_pool_index":{"type":"integer"}},"required":["account_index","initial_total_shares","min_operator_share_rate","staking_pool_index"]},"response.L2CreateSubAccountPubData":{"type":"object","properties":{"account_index":{"type":"string"},"subAccount_index":{"type":"string"}},"required":["account_index","subAccount_index"]},"response.L2MintSharesPubData":{"type":"object","properties":{"account_index":{"type":"string"},"public_pool_index":{"type":"integer"},"share_amount":{"type":"string"},"usdc_amount":{"type":"string"}},"required":["account_index","public_pool_index","share_amount","usdc_amount"]},"response.L2StakeAssetsPubData":{"type":"object","properties":{"account_index":{"type":"string"},"lit_amount":{"type":"string"},"share_amount":{"type":"string"},"staking_pool_index":{"type":"integer"}},"required":["account_index","lit_amount","share_amount","staking_pool_index"]},"response.L2TransferPubData":{"type":"object","properties":{"from_account_index":{"type":"string"},"to_account_index":{"type":"string"},"usdc_amount":{"type":"string"}},"required":["from_account_index","to_account_index","usdc_amount"]},"response.L2TransferPubDataV2":{"type":"object","properties":{"amount":{"type":"string"},"asset_index":{"type":"string"},"fee_account_index":{"type":"string"},"from_account_index":{"type":"string"},"from_route_type":{"type":"string"},"to_account_index":{"type":"string"},"to_route_type":{"type":"string"},"usdc_fee":{"type":"string"}},"required":["amount","asset_index","fee_account_index","from_account_index","from_route_type","to_account_index","to_route_type","usdc_fee"]},"response.L2UpdateAccountConfigPubData":{"type":"object","properties":{"account_index":{"type":"integer"},"account_trading_mode":{"type":"integer"},"asset_amounts":{"type":"array","items":{"$ref":"#/components/schemas/response.UnifiedAsset"}}},"required":["account_index","account_trading_mode","asset_amounts"]},"response.UnifiedAsset":{"type":"object","properties":{"asset_index":{"type":"integer"},"moved_asset_amount":{"type":"string"}},"required":["asset_index","moved_asset_amount"]},"response.L2UpdateLeveragePubData":{"type":"object","properties":{"account_index":{"type":"string"},"initial_margin_fraction":{"type":"integer"},"margin_mode":{"type":"integer"},"market_index":{"type":"integer"}},"required":["account_index","initial_margin_fraction","margin_mode","market_index"]},"response.L2UpdateMarginPubData":{"type":"object","properties":{"account_index":{"type":"string"},"direction":{"type":"integer"},"market_index":{"type":"integer"},"usdc_amount":{"type":"string"}},"required":["account_index","direction","market_index","usdc_amount"]},"types.L2UpdatePublicPoolPubData":{"type":"object","properties":{"min_operator_share_rate":{"type":"integer"},"operator_fee":{"type":"integer"},"public_pool_index":{"type":"integer"},"status":{"type":"integer"}},"required":["min_operator_share_rate","operator_fee","public_pool_index","status"]},"response.TradePubData":{"type":"object","properties":{"fee_account_index":{"type":"string"},"is_taker_ask":{"type":"integer"},"maker_account_index":{"type":"string"},"maker_fee":{"type":"integer"},"market_index":{"type":"integer"},"price":{"type":"string"},"size":{"type":"string"},"taker_account_index":{"type":"string"},"taker_fee":{"type":"integer"},"trade_type":{"type":"integer"}},"required":["fee_account_index","is_taker_ask","maker_account_index","maker_fee","market_index","price","size","taker_account_index","taker_fee","trade_type"]},"response.TradePubDataWithFunding":{"type":"object","properties":{"fee_account_index":{"type":"string"},"funding_rate_prefix_sum":{"type":"integer"},"is_taker_ask":{"type":"integer"},"maker_account_index":{"type":"string"},"maker_fee":{"type":"integer"},"market_index":{"type":"integer"},"price":{"type":"string"},"size":{"type":"string"},"taker_account_index":{"type":"string"},"taker_fee":{"type":"integer"},"trade_type":{"type":"integer"}},"required":["fee_account_index","funding_rate_prefix_sum","is_taker_ask","maker_account_index","maker_fee","market_index","price","size","taker_account_index","taker_fee","trade_type"]},"response.UnstakeAssetsPubData":{"type":"object","properties":{"account_index":{"type":"string"},"lit_amount":{"type":"string"},"share_amount":{"type":"string"},"staking_pool_index":{"type":"integer"}},"required":["account_index","lit_amount","share_amount","staking_pool_index"]},"response.WithdrawPubData":{"type":"object","properties":{"from_account_index":{"type":"string"},"usdc_amount":{"type":"string"}},"required":["from_account_index","usdc_amount"]},"response.WithdrawPubDataV2":{"type":"object","properties":{"amount":{"type":"string"},"asset_index":{"type":"string"},"from_account_index":{"type":"string"},"route_type":{"type":"string"}},"required":["amount","asset_index","from_account_index","route_type"]}}}}
```

## The response.PubDataType object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"response.PubDataType":{"type":"string","enum":["Empty","L1Deposit","L1CreateMarket","L1UpdateMarket","L2CreateSubAccount","L2CreatePublicPool","L2UpdatePublicPool","L2MintShares","L2UpdateLeverage","L2UpdateMargin","L2Transfer","Withdraw","Trade","TradeWithFunding","LiquidationTrade","LiquidationTradeWithFunding","BurnedShares","ExitPosition","ExitPositionWithFunding","Deleverage","DeleverageWithFunding","L1RegisterAsset","L1UpdateAsset","L1CreateSpotMarket","L1UpdateSpotMarket","WithdrawV2","L1CreateMarketV2","L1DepositV2","L1UpdateMarketV2","L2TransferV2","L2CreateStakingPool","L2UpdateStakingPool","L2StakeAssets","UnstakeAssets","L1SetSystemConfig","ExecutedPendingUnlock","L2UpdateAccountConfig","L2UpdateMarketConfig"]}}}}
```

## The response.RecentBatch object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"response.RecentBatch":{"type":"object","properties":{"batch_details":{"allOf":[{"$ref":"#/components/schemas/response.BatchDetails"}],"nullable":true},"batch_number":{"type":"integer"},"batch_size":{"type":"integer"},"batch_status":{"$ref":"#/components/schemas/response.BatchStatus"},"updated_at":{"type":"string"}},"required":["batch_details","batch_number","batch_size","batch_status","updated_at"]},"response.BatchDetails":{"type":"object","properties":{"commit_tx_hash":{"type":"string","nullable":true},"execute_tx_hash":{"type":"string","nullable":true},"verify_tx_hash":{"type":"string","nullable":true}},"required":["commit_tx_hash","execute_tx_hash","verify_tx_hash"]},"response.BatchStatus":{"type":"string","enum":["nothing_to_execute","committed","verified","executed"]}}}}
```

## The response.RecentBlock object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"response.RecentBlock":{"type":"object","properties":{"batch_details":{"allOf":[{"$ref":"#/components/schemas/response.BatchDetails"}],"nullable":true},"batch_status":{"$ref":"#/components/schemas/response.BatchStatus"},"block_height":{"type":"integer"},"block_size":{"type":"integer"},"updated_at":{"type":"string"}},"required":["batch_details","batch_status","block_height","block_size","updated_at"]},"response.BatchDetails":{"type":"object","properties":{"commit_tx_hash":{"type":"string","nullable":true},"execute_tx_hash":{"type":"string","nullable":true},"verify_tx_hash":{"type":"string","nullable":true}},"required":["commit_tx_hash","execute_tx_hash","verify_tx_hash"]},"response.BatchStatus":{"type":"string","enum":["nothing_to_execute","committed","verified","executed"]}}}}
```

## The response.StatsData object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"response.StatsData":{"type":"object","properties":{"chart":{"$ref":"#/components/schemas/response.ChartData"}},"required":["chart"]},"response.ChartData":{"type":"object","properties":{"data":{"type":"array","items":{"type":"array","items":{"type":"integer"}}},"types":{"type":"array","items":{"type":"string"}}},"required":["data","types"]}}}}
```

## The response.StatsResponse object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"response.StatsResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/response.StatsData"}},"required":["data"]},"response.StatsData":{"type":"object","properties":{"chart":{"$ref":"#/components/schemas/response.ChartData"}},"required":["chart"]},"response.ChartData":{"type":"object","properties":{"data":{"type":"array","items":{"type":"array","items":{"type":"integer"}}},"types":{"type":"array","items":{"type":"string"}}},"required":["data","types"]}}}}
```

## The response.TotalValues object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"response.TotalValues":{"type":"object","properties":{"accounts":{"type":"integer"},"batches":{"type":"integer"},"blocks":{"type":"integer"},"txs":{"type":"integer"}},"required":["accounts","batches","blocks","txs"]}}}}
```

## The response.TradePubData object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"response.TradePubData":{"type":"object","properties":{"fee_account_index":{"type":"string"},"is_taker_ask":{"type":"integer"},"maker_account_index":{"type":"string"},"maker_fee":{"type":"integer"},"market_index":{"type":"integer"},"price":{"type":"string"},"size":{"type":"string"},"taker_account_index":{"type":"string"},"taker_fee":{"type":"integer"},"trade_type":{"type":"integer"}},"required":["fee_account_index","is_taker_ask","maker_account_index","maker_fee","market_index","price","size","taker_account_index","taker_fee","trade_type"]}}}}
```

## The response.TradePubDataWithFunding object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"response.TradePubDataWithFunding":{"type":"object","properties":{"fee_account_index":{"type":"string"},"funding_rate_prefix_sum":{"type":"integer"},"is_taker_ask":{"type":"integer"},"maker_account_index":{"type":"string"},"maker_fee":{"type":"integer"},"market_index":{"type":"integer"},"price":{"type":"string"},"size":{"type":"string"},"taker_account_index":{"type":"string"},"taker_fee":{"type":"integer"},"trade_type":{"type":"integer"}},"required":["fee_account_index","funding_rate_prefix_sum","is_taker_ask","maker_account_index","maker_fee","market_index","price","size","taker_account_index","taker_fee","trade_type"]}}}}
```

## The response.Tx object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"response.Tx":{"type":"object","properties":{"hash":{"type":"string"},"pubdata":{"$ref":"#/components/schemas/response.PubData"},"pubdata_type":{"$ref":"#/components/schemas/response.PubDataType"},"status":{"allOf":[{"$ref":"#/components/schemas/response.BatchStatus"}],"nullable":true},"time":{"type":"string"},"tx_type":{"$ref":"#/components/schemas/response.TxType"}},"required":["hash","pubdata","pubdata_type","status","time","tx_type"]},"response.PubData":{"type":"object","properties":{"burned_shares_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.BurnedSharesPubData"}],"nullable":true},"deleverage_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.DeleveragePubData"}],"nullable":true},"deleverage_pubdata_with_funding":{"allOf":[{"$ref":"#/components/schemas/response.DeleveragePubDataWithFunding"}],"nullable":true},"executed_pending_unlock_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.ExecutedPendingUnlockPubData"}],"nullable":true},"exit_position_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.ExitPositionPubData"}],"nullable":true},"exit_position_pubdata_with_funding":{"allOf":[{"$ref":"#/components/schemas/response.ExitPositionPubDataWithFunding"}],"nullable":true},"l1_create_market_pubdata":{"allOf":[{"$ref":"#/components/schemas/types.L1CreateMarketPubData"}],"nullable":true},"l1_create_market_pubdata_v2":{"allOf":[{"$ref":"#/components/schemas/types.L1CreateMarketPubDataV2"}],"nullable":true},"l1_create_spot_market_pubdata":{"allOf":[{"$ref":"#/components/schemas/types.L1CreateSpotMarketPubData"}],"nullable":true},"l1_deposit_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.L1DepositPubData"}],"nullable":true},"l1_deposit_pubdata_v2":{"allOf":[{"$ref":"#/components/schemas/response.L1DepositPubDataV2"}],"nullable":true},"l1_register_asset_pubdata":{"allOf":[{"$ref":"#/components/schemas/types.L1RegisterAssetPubData"}],"nullable":true},"l1_set_system_config_pubdata":{"allOf":[{"$ref":"#/components/schemas/types.L1SetSystemConfigPubData"}],"nullable":true},"l1_update_asset_pubdata":{"allOf":[{"$ref":"#/components/schemas/types.L1UpdateAssetPubData"}],"nullable":true},"l1_update_market_pubdata":{"allOf":[{"$ref":"#/components/schemas/types.L1UpdateMarketPubData"}],"nullable":true},"l1_update_spot_market_pubdata":{"allOf":[{"$ref":"#/components/schemas/types.L1UpdateSpotMarketPubData"}],"nullable":true},"l2_create_public_pool_pubdata":{"allOf":[{"$ref":"#/components/schemas/types.L2CreatePublicPoolPubData"}],"nullable":true},"l2_create_staking_pool_pubdata":{"allOf":[{"$ref":"#/components/schemas/types.L2CreateStakingPoolPubData"}],"nullable":true},"l2_create_sub_account_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.L2CreateSubAccountPubData"}],"nullable":true},"l2_mint_shares_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.L2MintSharesPubData"}],"nullable":true},"l2_stake_assets_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.L2StakeAssetsPubData"}],"nullable":true},"l2_transfer_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.L2TransferPubData"}],"nullable":true},"l2_transfer_pubdata_v2":{"allOf":[{"$ref":"#/components/schemas/response.L2TransferPubDataV2"}],"nullable":true},"l2_update_account_config_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.L2UpdateAccountConfigPubData"}],"nullable":true},"l2_update_leverage_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.L2UpdateLeveragePubData"}],"nullable":true},"l2_update_margin_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.L2UpdateMarginPubData"}],"nullable":true},"l2_update_public_pool_pubdata":{"allOf":[{"$ref":"#/components/schemas/types.L2UpdatePublicPoolPubData"}],"nullable":true},"trade_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.TradePubData"}],"nullable":true},"trade_pubdata_with_funding":{"allOf":[{"$ref":"#/components/schemas/response.TradePubDataWithFunding"}],"nullable":true},"unstake_assets_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.UnstakeAssetsPubData"}],"nullable":true},"withdraw_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.WithdrawPubData"}],"nullable":true},"withdraw_pubdata_v2":{"allOf":[{"$ref":"#/components/schemas/response.WithdrawPubDataV2"}],"nullable":true}},"required":["burned_shares_pubdata","deleverage_pubdata","deleverage_pubdata_with_funding","executed_pending_unlock_pubdata","exit_position_pubdata","exit_position_pubdata_with_funding","l1_create_market_pubdata","l1_create_market_pubdata_v2","l1_create_spot_market_pubdata","l1_deposit_pubdata","l1_deposit_pubdata_v2","l1_register_asset_pubdata","l1_set_system_config_pubdata","l1_update_asset_pubdata","l1_update_market_pubdata","l1_update_spot_market_pubdata","l2_create_public_pool_pubdata","l2_create_staking_pool_pubdata","l2_create_sub_account_pubdata","l2_mint_shares_pubdata","l2_stake_assets_pubdata","l2_transfer_pubdata","l2_transfer_pubdata_v2","l2_update_account_config_pubdata","l2_update_leverage_pubdata","l2_update_margin_pubdata","l2_update_public_pool_pubdata","trade_pubdata","trade_pubdata_with_funding","unstake_assets_pubdata","withdraw_pubdata","withdraw_pubdata_v2"]},"response.BurnedSharesPubData":{"type":"object","properties":{"account_index":{"type":"string"},"operator_fee_share_amount":{"type":"string"},"public_pool_index":{"type":"integer"},"shares_to_burn":{"type":"string"},"shares_to_burn_usdc":{"type":"string"}},"required":["account_index","operator_fee_share_amount","public_pool_index","shares_to_burn","shares_to_burn_usdc"]},"response.DeleveragePubData":{"type":"object","properties":{"bankrupt_account_index":{"type":"string"},"deleverager_account_index":{"type":"string"},"is_taker_ask":{"type":"integer"},"market_index":{"type":"integer"},"quote":{"type":"string"},"size":{"type":"string"}},"required":["bankrupt_account_index","deleverager_account_index","is_taker_ask","market_index","quote","size"]},"response.DeleveragePubDataWithFunding":{"type":"object","properties":{"bankrupt_account_index":{"type":"string"},"deleverager_account_index":{"type":"string"},"funding_rate_prefix_sum":{"description":"FundingPubData","type":"integer"},"is_taker_ask":{"type":"integer"},"market_index":{"type":"integer"},"quote":{"type":"string"},"size":{"type":"string"}},"required":["bankrupt_account_index","deleverager_account_index","funding_rate_prefix_sum","is_taker_ask","market_index","quote","size"]},"response.ExecutedPendingUnlockPubData":{"type":"object","properties":{"account_index":{"type":"string"},"amount":{"type":"string"},"asset_symbol":{"type":"string"}},"required":["account_index","amount","asset_symbol"]},"response.ExitPositionPubData":{"type":"object","properties":{"account_index":{"type":"string"},"market_index":{"type":"integer"},"settlement_price":{"type":"string"}},"required":["account_index","market_index","settlement_price"]},"response.ExitPositionPubDataWithFunding":{"type":"object","properties":{"account_index":{"type":"string"},"funding_rate_prefix_sum":{"description":"FundingPubData","type":"integer"},"market_index":{"type":"integer"},"settlement_price":{"type":"string"}},"required":["account_index","funding_rate_prefix_sum","market_index","settlement_price"]},"types.L1CreateMarketPubData":{"type":"object","properties":{"close_out_margin_fraction":{"type":"integer"},"default_initial_margin_fraction":{"type":"integer"},"interest_rate":{"type":"integer"},"liquidation_fee":{"type":"integer"},"maintenance_margin_fraction":{"type":"integer"},"maker_fee":{"type":"integer"},"market_index":{"type":"integer"},"min_base_amount":{"type":"integer"},"min_initial_margin_fraction":{"type":"integer"},"min_quote_amount":{"type":"integer"},"quote_multiplier":{"type":"integer"},"taker_fee":{"type":"integer"}},"required":["close_out_margin_fraction","default_initial_margin_fraction","interest_rate","liquidation_fee","maintenance_margin_fraction","maker_fee","market_index","min_base_amount","min_initial_margin_fraction","min_quote_amount","quote_multiplier","taker_fee"]},"types.L1CreateMarketPubDataV2":{"type":"object","properties":{"close_out_margin_fraction":{"type":"integer"},"default_initial_margin_fraction":{"type":"integer"},"funding_clamp_big":{"type":"integer"},"funding_clamp_small":{"type":"integer"},"interest_rate":{"type":"integer"},"liquidation_fee":{"type":"integer"},"maintenance_margin_fraction":{"type":"integer"},"maker_fee":{"type":"integer"},"market_index":{"type":"integer"},"min_base_amount":{"type":"integer"},"min_initial_margin_fraction":{"type":"integer"},"min_quote_amount":{"type":"integer"},"open_interest_limit":{"type":"integer"},"order_quote_limit":{"type":"integer"},"quote_multiplier":{"type":"integer"},"taker_fee":{"type":"integer"}},"required":["close_out_margin_fraction","default_initial_margin_fraction","funding_clamp_big","funding_clamp_small","interest_rate","liquidation_fee","maintenance_margin_fraction","maker_fee","market_index","min_base_amount","min_initial_margin_fraction","min_quote_amount","open_interest_limit","order_quote_limit","quote_multiplier","taker_fee"]},"types.L1CreateSpotMarketPubData":{"type":"object","properties":{"base_asset_id":{"type":"integer"},"maker_fee":{"type":"integer"},"market_index":{"type":"integer"},"min_base_amount":{"type":"integer"},"min_quote_amount":{"type":"integer"},"order_quote_limit":{"type":"integer"},"quote_asset_id":{"type":"integer"},"quote_extension_multiplier":{"type":"integer"},"size_extension_multiplier":{"type":"integer"},"taker_fee":{"type":"integer"}},"required":["base_asset_id","maker_fee","market_index","min_base_amount","min_quote_amount","order_quote_limit","quote_asset_id","quote_extension_multiplier","size_extension_multiplier","taker_fee"]},"response.L1DepositPubData":{"type":"object","properties":{"account_index":{"type":"string"},"l1_address":{"type":"string"},"usdc_amount":{"type":"string"}},"required":["account_index","l1_address","usdc_amount"]},"response.L1DepositPubDataV2":{"type":"object","properties":{"accepted_amount":{"type":"string"},"account_index":{"type":"string"},"asset_index":{"type":"string"},"l1_address":{"type":"string"},"route_type":{"type":"string"}},"required":["accepted_amount","account_index","asset_index","l1_address","route_type"]},"types.L1RegisterAssetPubData":{"type":"object","properties":{"asset_index":{"type":"integer"},"extension_multiplier":{"type":"integer"},"margin_mode":{"type":"integer"},"min_transfer_amount":{"type":"integer"},"min_withdrawal_amount":{"type":"integer"}},"required":["asset_index","extension_multiplier","margin_mode","min_transfer_amount","min_withdrawal_amount"]},"types.L1SetSystemConfigPubData":{"type":"object","properties":{"liquidity_pool_cooldown_period":{"type":"integer"},"liquidity_pool_index":{"type":"integer"},"max_integrator_perps_maker_fee":{"type":"integer"},"max_integrator_perps_taker_fee":{"type":"integer"},"max_integrator_spot_maker_fee":{"type":"integer"},"max_integrator_spot_taker_fee":{"type":"integer"},"staking_pool_index":{"type":"integer"},"staking_pool_lockup_period":{"type":"integer"}},"required":["liquidity_pool_cooldown_period","liquidity_pool_index","max_integrator_perps_maker_fee","max_integrator_perps_taker_fee","max_integrator_spot_maker_fee","max_integrator_spot_taker_fee","staking_pool_index","staking_pool_lockup_period"]},"types.L1UpdateAssetPubData":{"type":"object","properties":{"asset_index":{"type":"integer"},"margin_mode":{"type":"integer"},"min_transfer_amount":{"type":"integer"},"min_withdrawal_amount":{"type":"integer"}},"required":["asset_index","margin_mode","min_transfer_amount","min_withdrawal_amount"]},"types.L1UpdateMarketPubData":{"type":"object","properties":{"close_out_margin_fraction":{"type":"integer"},"default_initial_margin_fraction":{"type":"integer"},"interest_rate":{"type":"integer"},"liquidation_fee":{"type":"integer"},"maintenance_margin_fraction":{"type":"integer"},"maker_fee":{"type":"integer"},"market_index":{"type":"integer"},"min_base_amount":{"type":"integer"},"min_initial_margin_fraction":{"type":"integer"},"min_quote_amount":{"type":"integer"},"status":{"type":"integer"},"taker_fee":{"type":"integer"}},"required":["close_out_margin_fraction","default_initial_margin_fraction","interest_rate","liquidation_fee","maintenance_margin_fraction","maker_fee","market_index","min_base_amount","min_initial_margin_fraction","min_quote_amount","status","taker_fee"]},"types.L1UpdateSpotMarketPubData":{"type":"object","properties":{"maker_fee":{"type":"integer"},"market_index":{"type":"integer"},"min_base_amount":{"type":"integer"},"min_quote_amount":{"type":"integer"},"order_quote_limit":{"type":"integer"},"status":{"type":"integer"},"taker_fee":{"type":"integer"}},"required":["maker_fee","market_index","min_base_amount","min_quote_amount","order_quote_limit","status","taker_fee"]},"types.L2CreatePublicPoolPubData":{"type":"object","properties":{"account_index":{"type":"integer"},"initial_total_shares":{"type":"integer"},"min_operator_share_rate":{"type":"integer"},"operator_fee":{"type":"integer"},"public_pool_index":{"type":"integer"}},"required":["account_index","initial_total_shares","min_operator_share_rate","operator_fee","public_pool_index"]},"types.L2CreateStakingPoolPubData":{"type":"object","properties":{"account_index":{"type":"integer"},"initial_total_shares":{"type":"integer"},"min_operator_share_rate":{"type":"integer"},"staking_pool_index":{"type":"integer"}},"required":["account_index","initial_total_shares","min_operator_share_rate","staking_pool_index"]},"response.L2CreateSubAccountPubData":{"type":"object","properties":{"account_index":{"type":"string"},"subAccount_index":{"type":"string"}},"required":["account_index","subAccount_index"]},"response.L2MintSharesPubData":{"type":"object","properties":{"account_index":{"type":"string"},"public_pool_index":{"type":"integer"},"share_amount":{"type":"string"},"usdc_amount":{"type":"string"}},"required":["account_index","public_pool_index","share_amount","usdc_amount"]},"response.L2StakeAssetsPubData":{"type":"object","properties":{"account_index":{"type":"string"},"lit_amount":{"type":"string"},"share_amount":{"type":"string"},"staking_pool_index":{"type":"integer"}},"required":["account_index","lit_amount","share_amount","staking_pool_index"]},"response.L2TransferPubData":{"type":"object","properties":{"from_account_index":{"type":"string"},"to_account_index":{"type":"string"},"usdc_amount":{"type":"string"}},"required":["from_account_index","to_account_index","usdc_amount"]},"response.L2TransferPubDataV2":{"type":"object","properties":{"amount":{"type":"string"},"asset_index":{"type":"string"},"fee_account_index":{"type":"string"},"from_account_index":{"type":"string"},"from_route_type":{"type":"string"},"to_account_index":{"type":"string"},"to_route_type":{"type":"string"},"usdc_fee":{"type":"string"}},"required":["amount","asset_index","fee_account_index","from_account_index","from_route_type","to_account_index","to_route_type","usdc_fee"]},"response.L2UpdateAccountConfigPubData":{"type":"object","properties":{"account_index":{"type":"integer"},"account_trading_mode":{"type":"integer"},"asset_amounts":{"type":"array","items":{"$ref":"#/components/schemas/response.UnifiedAsset"}}},"required":["account_index","account_trading_mode","asset_amounts"]},"response.UnifiedAsset":{"type":"object","properties":{"asset_index":{"type":"integer"},"moved_asset_amount":{"type":"string"}},"required":["asset_index","moved_asset_amount"]},"response.L2UpdateLeveragePubData":{"type":"object","properties":{"account_index":{"type":"string"},"initial_margin_fraction":{"type":"integer"},"margin_mode":{"type":"integer"},"market_index":{"type":"integer"}},"required":["account_index","initial_margin_fraction","margin_mode","market_index"]},"response.L2UpdateMarginPubData":{"type":"object","properties":{"account_index":{"type":"string"},"direction":{"type":"integer"},"market_index":{"type":"integer"},"usdc_amount":{"type":"string"}},"required":["account_index","direction","market_index","usdc_amount"]},"types.L2UpdatePublicPoolPubData":{"type":"object","properties":{"min_operator_share_rate":{"type":"integer"},"operator_fee":{"type":"integer"},"public_pool_index":{"type":"integer"},"status":{"type":"integer"}},"required":["min_operator_share_rate","operator_fee","public_pool_index","status"]},"response.TradePubData":{"type":"object","properties":{"fee_account_index":{"type":"string"},"is_taker_ask":{"type":"integer"},"maker_account_index":{"type":"string"},"maker_fee":{"type":"integer"},"market_index":{"type":"integer"},"price":{"type":"string"},"size":{"type":"string"},"taker_account_index":{"type":"string"},"taker_fee":{"type":"integer"},"trade_type":{"type":"integer"}},"required":["fee_account_index","is_taker_ask","maker_account_index","maker_fee","market_index","price","size","taker_account_index","taker_fee","trade_type"]},"response.TradePubDataWithFunding":{"type":"object","properties":{"fee_account_index":{"type":"string"},"funding_rate_prefix_sum":{"type":"integer"},"is_taker_ask":{"type":"integer"},"maker_account_index":{"type":"string"},"maker_fee":{"type":"integer"},"market_index":{"type":"integer"},"price":{"type":"string"},"size":{"type":"string"},"taker_account_index":{"type":"string"},"taker_fee":{"type":"integer"},"trade_type":{"type":"integer"}},"required":["fee_account_index","funding_rate_prefix_sum","is_taker_ask","maker_account_index","maker_fee","market_index","price","size","taker_account_index","taker_fee","trade_type"]},"response.UnstakeAssetsPubData":{"type":"object","properties":{"account_index":{"type":"string"},"lit_amount":{"type":"string"},"share_amount":{"type":"string"},"staking_pool_index":{"type":"integer"}},"required":["account_index","lit_amount","share_amount","staking_pool_index"]},"response.WithdrawPubData":{"type":"object","properties":{"from_account_index":{"type":"string"},"usdc_amount":{"type":"string"}},"required":["from_account_index","usdc_amount"]},"response.WithdrawPubDataV2":{"type":"object","properties":{"amount":{"type":"string"},"asset_index":{"type":"string"},"from_account_index":{"type":"string"},"route_type":{"type":"string"}},"required":["amount","asset_index","from_account_index","route_type"]},"response.PubDataType":{"type":"string","enum":["Empty","L1Deposit","L1CreateMarket","L1UpdateMarket","L2CreateSubAccount","L2CreatePublicPool","L2UpdatePublicPool","L2MintShares","L2UpdateLeverage","L2UpdateMargin","L2Transfer","Withdraw","Trade","TradeWithFunding","LiquidationTrade","LiquidationTradeWithFunding","BurnedShares","ExitPosition","ExitPositionWithFunding","Deleverage","DeleverageWithFunding","L1RegisterAsset","L1UpdateAsset","L1CreateSpotMarket","L1UpdateSpotMarket","WithdrawV2","L1CreateMarketV2","L1DepositV2","L1UpdateMarketV2","L2TransferV2","L2CreateStakingPool","L2UpdateStakingPool","L2StakeAssets","UnstakeAssets","L1SetSystemConfig","ExecutedPendingUnlock","L2UpdateAccountConfig","L2UpdateMarketConfig"]},"response.BatchStatus":{"type":"string","enum":["nothing_to_execute","committed","verified","executed"]},"response.TxType":{"type":"string","enum":["Empty","L1Deposit","L1ChangePubKey","L1CreateMarket","L1UpdateMarket","L1CancelAllOrders","L1Withdraw","L1CreateOrder","L2ChangePubKey","L2CreateSubAccount","L2CreatePublicPool","L2UpdatePublicPool","L2Transfer","L2Withdraw","L2CreateOrder","L2CancelOrder","L2CancelAllOrders","L2ModifyOrder","L2MintShares","L2BurnShares","L2UpdateLeverage","InternalClaimOrder","InternalCancelOrder","InternalDeleverage","InternalExitPosition","InternalCancelAllOrders","InternalLiquidatePosition","InternalCreateOrder","L2CreateGroupedOrders","L2UpdateMargin","L1BurnShares","L1RegisterAsset","L1UpdateAsset","L2CreateStakingPool","L2StakeAssets","L2UnstakeAssets","L1UnstakeAssets","L1SetSystemConfig","InternalPendingUnlock","L2ForceBurnShares","L2UpdateAccountConfig","L2StrategyTransfer","L2UpdateMarketConfig","InternalTransfer","L2ApproveIntegrator"]}}}}
```

## The response.TxDetailed object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"response.TxDetailed":{"type":"object","properties":{"batch_number":{"type":"integer","nullable":true},"block_number":{"type":"integer"},"hash":{"type":"string"},"pubdata":{"$ref":"#/components/schemas/response.PubData"},"pubdata_type":{"$ref":"#/components/schemas/response.PubDataType"},"status":{"allOf":[{"$ref":"#/components/schemas/response.BatchStatus"}],"nullable":true},"time":{"type":"string"},"tx_type":{"$ref":"#/components/schemas/response.TxType"}},"required":["batch_number","block_number","hash","pubdata","pubdata_type","status","time","tx_type"]},"response.PubData":{"type":"object","properties":{"burned_shares_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.BurnedSharesPubData"}],"nullable":true},"deleverage_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.DeleveragePubData"}],"nullable":true},"deleverage_pubdata_with_funding":{"allOf":[{"$ref":"#/components/schemas/response.DeleveragePubDataWithFunding"}],"nullable":true},"executed_pending_unlock_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.ExecutedPendingUnlockPubData"}],"nullable":true},"exit_position_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.ExitPositionPubData"}],"nullable":true},"exit_position_pubdata_with_funding":{"allOf":[{"$ref":"#/components/schemas/response.ExitPositionPubDataWithFunding"}],"nullable":true},"l1_create_market_pubdata":{"allOf":[{"$ref":"#/components/schemas/types.L1CreateMarketPubData"}],"nullable":true},"l1_create_market_pubdata_v2":{"allOf":[{"$ref":"#/components/schemas/types.L1CreateMarketPubDataV2"}],"nullable":true},"l1_create_spot_market_pubdata":{"allOf":[{"$ref":"#/components/schemas/types.L1CreateSpotMarketPubData"}],"nullable":true},"l1_deposit_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.L1DepositPubData"}],"nullable":true},"l1_deposit_pubdata_v2":{"allOf":[{"$ref":"#/components/schemas/response.L1DepositPubDataV2"}],"nullable":true},"l1_register_asset_pubdata":{"allOf":[{"$ref":"#/components/schemas/types.L1RegisterAssetPubData"}],"nullable":true},"l1_set_system_config_pubdata":{"allOf":[{"$ref":"#/components/schemas/types.L1SetSystemConfigPubData"}],"nullable":true},"l1_update_asset_pubdata":{"allOf":[{"$ref":"#/components/schemas/types.L1UpdateAssetPubData"}],"nullable":true},"l1_update_market_pubdata":{"allOf":[{"$ref":"#/components/schemas/types.L1UpdateMarketPubData"}],"nullable":true},"l1_update_spot_market_pubdata":{"allOf":[{"$ref":"#/components/schemas/types.L1UpdateSpotMarketPubData"}],"nullable":true},"l2_create_public_pool_pubdata":{"allOf":[{"$ref":"#/components/schemas/types.L2CreatePublicPoolPubData"}],"nullable":true},"l2_create_staking_pool_pubdata":{"allOf":[{"$ref":"#/components/schemas/types.L2CreateStakingPoolPubData"}],"nullable":true},"l2_create_sub_account_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.L2CreateSubAccountPubData"}],"nullable":true},"l2_mint_shares_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.L2MintSharesPubData"}],"nullable":true},"l2_stake_assets_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.L2StakeAssetsPubData"}],"nullable":true},"l2_transfer_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.L2TransferPubData"}],"nullable":true},"l2_transfer_pubdata_v2":{"allOf":[{"$ref":"#/components/schemas/response.L2TransferPubDataV2"}],"nullable":true},"l2_update_account_config_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.L2UpdateAccountConfigPubData"}],"nullable":true},"l2_update_leverage_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.L2UpdateLeveragePubData"}],"nullable":true},"l2_update_margin_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.L2UpdateMarginPubData"}],"nullable":true},"l2_update_public_pool_pubdata":{"allOf":[{"$ref":"#/components/schemas/types.L2UpdatePublicPoolPubData"}],"nullable":true},"trade_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.TradePubData"}],"nullable":true},"trade_pubdata_with_funding":{"allOf":[{"$ref":"#/components/schemas/response.TradePubDataWithFunding"}],"nullable":true},"unstake_assets_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.UnstakeAssetsPubData"}],"nullable":true},"withdraw_pubdata":{"allOf":[{"$ref":"#/components/schemas/response.WithdrawPubData"}],"nullable":true},"withdraw_pubdata_v2":{"allOf":[{"$ref":"#/components/schemas/response.WithdrawPubDataV2"}],"nullable":true}},"required":["burned_shares_pubdata","deleverage_pubdata","deleverage_pubdata_with_funding","executed_pending_unlock_pubdata","exit_position_pubdata","exit_position_pubdata_with_funding","l1_create_market_pubdata","l1_create_market_pubdata_v2","l1_create_spot_market_pubdata","l1_deposit_pubdata","l1_deposit_pubdata_v2","l1_register_asset_pubdata","l1_set_system_config_pubdata","l1_update_asset_pubdata","l1_update_market_pubdata","l1_update_spot_market_pubdata","l2_create_public_pool_pubdata","l2_create_staking_pool_pubdata","l2_create_sub_account_pubdata","l2_mint_shares_pubdata","l2_stake_assets_pubdata","l2_transfer_pubdata","l2_transfer_pubdata_v2","l2_update_account_config_pubdata","l2_update_leverage_pubdata","l2_update_margin_pubdata","l2_update_public_pool_pubdata","trade_pubdata","trade_pubdata_with_funding","unstake_assets_pubdata","withdraw_pubdata","withdraw_pubdata_v2"]},"response.BurnedSharesPubData":{"type":"object","properties":{"account_index":{"type":"string"},"operator_fee_share_amount":{"type":"string"},"public_pool_index":{"type":"integer"},"shares_to_burn":{"type":"string"},"shares_to_burn_usdc":{"type":"string"}},"required":["account_index","operator_fee_share_amount","public_pool_index","shares_to_burn","shares_to_burn_usdc"]},"response.DeleveragePubData":{"type":"object","properties":{"bankrupt_account_index":{"type":"string"},"deleverager_account_index":{"type":"string"},"is_taker_ask":{"type":"integer"},"market_index":{"type":"integer"},"quote":{"type":"string"},"size":{"type":"string"}},"required":["bankrupt_account_index","deleverager_account_index","is_taker_ask","market_index","quote","size"]},"response.DeleveragePubDataWithFunding":{"type":"object","properties":{"bankrupt_account_index":{"type":"string"},"deleverager_account_index":{"type":"string"},"funding_rate_prefix_sum":{"description":"FundingPubData","type":"integer"},"is_taker_ask":{"type":"integer"},"market_index":{"type":"integer"},"quote":{"type":"string"},"size":{"type":"string"}},"required":["bankrupt_account_index","deleverager_account_index","funding_rate_prefix_sum","is_taker_ask","market_index","quote","size"]},"response.ExecutedPendingUnlockPubData":{"type":"object","properties":{"account_index":{"type":"string"},"amount":{"type":"string"},"asset_symbol":{"type":"string"}},"required":["account_index","amount","asset_symbol"]},"response.ExitPositionPubData":{"type":"object","properties":{"account_index":{"type":"string"},"market_index":{"type":"integer"},"settlement_price":{"type":"string"}},"required":["account_index","market_index","settlement_price"]},"response.ExitPositionPubDataWithFunding":{"type":"object","properties":{"account_index":{"type":"string"},"funding_rate_prefix_sum":{"description":"FundingPubData","type":"integer"},"market_index":{"type":"integer"},"settlement_price":{"type":"string"}},"required":["account_index","funding_rate_prefix_sum","market_index","settlement_price"]},"types.L1CreateMarketPubData":{"type":"object","properties":{"close_out_margin_fraction":{"type":"integer"},"default_initial_margin_fraction":{"type":"integer"},"interest_rate":{"type":"integer"},"liquidation_fee":{"type":"integer"},"maintenance_margin_fraction":{"type":"integer"},"maker_fee":{"type":"integer"},"market_index":{"type":"integer"},"min_base_amount":{"type":"integer"},"min_initial_margin_fraction":{"type":"integer"},"min_quote_amount":{"type":"integer"},"quote_multiplier":{"type":"integer"},"taker_fee":{"type":"integer"}},"required":["close_out_margin_fraction","default_initial_margin_fraction","interest_rate","liquidation_fee","maintenance_margin_fraction","maker_fee","market_index","min_base_amount","min_initial_margin_fraction","min_quote_amount","quote_multiplier","taker_fee"]},"types.L1CreateMarketPubDataV2":{"type":"object","properties":{"close_out_margin_fraction":{"type":"integer"},"default_initial_margin_fraction":{"type":"integer"},"funding_clamp_big":{"type":"integer"},"funding_clamp_small":{"type":"integer"},"interest_rate":{"type":"integer"},"liquidation_fee":{"type":"integer"},"maintenance_margin_fraction":{"type":"integer"},"maker_fee":{"type":"integer"},"market_index":{"type":"integer"},"min_base_amount":{"type":"integer"},"min_initial_margin_fraction":{"type":"integer"},"min_quote_amount":{"type":"integer"},"open_interest_limit":{"type":"integer"},"order_quote_limit":{"type":"integer"},"quote_multiplier":{"type":"integer"},"taker_fee":{"type":"integer"}},"required":["close_out_margin_fraction","default_initial_margin_fraction","funding_clamp_big","funding_clamp_small","interest_rate","liquidation_fee","maintenance_margin_fraction","maker_fee","market_index","min_base_amount","min_initial_margin_fraction","min_quote_amount","open_interest_limit","order_quote_limit","quote_multiplier","taker_fee"]},"types.L1CreateSpotMarketPubData":{"type":"object","properties":{"base_asset_id":{"type":"integer"},"maker_fee":{"type":"integer"},"market_index":{"type":"integer"},"min_base_amount":{"type":"integer"},"min_quote_amount":{"type":"integer"},"order_quote_limit":{"type":"integer"},"quote_asset_id":{"type":"integer"},"quote_extension_multiplier":{"type":"integer"},"size_extension_multiplier":{"type":"integer"},"taker_fee":{"type":"integer"}},"required":["base_asset_id","maker_fee","market_index","min_base_amount","min_quote_amount","order_quote_limit","quote_asset_id","quote_extension_multiplier","size_extension_multiplier","taker_fee"]},"response.L1DepositPubData":{"type":"object","properties":{"account_index":{"type":"string"},"l1_address":{"type":"string"},"usdc_amount":{"type":"string"}},"required":["account_index","l1_address","usdc_amount"]},"response.L1DepositPubDataV2":{"type":"object","properties":{"accepted_amount":{"type":"string"},"account_index":{"type":"string"},"asset_index":{"type":"string"},"l1_address":{"type":"string"},"route_type":{"type":"string"}},"required":["accepted_amount","account_index","asset_index","l1_address","route_type"]},"types.L1RegisterAssetPubData":{"type":"object","properties":{"asset_index":{"type":"integer"},"extension_multiplier":{"type":"integer"},"margin_mode":{"type":"integer"},"min_transfer_amount":{"type":"integer"},"min_withdrawal_amount":{"type":"integer"}},"required":["asset_index","extension_multiplier","margin_mode","min_transfer_amount","min_withdrawal_amount"]},"types.L1SetSystemConfigPubData":{"type":"object","properties":{"liquidity_pool_cooldown_period":{"type":"integer"},"liquidity_pool_index":{"type":"integer"},"max_integrator_perps_maker_fee":{"type":"integer"},"max_integrator_perps_taker_fee":{"type":"integer"},"max_integrator_spot_maker_fee":{"type":"integer"},"max_integrator_spot_taker_fee":{"type":"integer"},"staking_pool_index":{"type":"integer"},"staking_pool_lockup_period":{"type":"integer"}},"required":["liquidity_pool_cooldown_period","liquidity_pool_index","max_integrator_perps_maker_fee","max_integrator_perps_taker_fee","max_integrator_spot_maker_fee","max_integrator_spot_taker_fee","staking_pool_index","staking_pool_lockup_period"]},"types.L1UpdateAssetPubData":{"type":"object","properties":{"asset_index":{"type":"integer"},"margin_mode":{"type":"integer"},"min_transfer_amount":{"type":"integer"},"min_withdrawal_amount":{"type":"integer"}},"required":["asset_index","margin_mode","min_transfer_amount","min_withdrawal_amount"]},"types.L1UpdateMarketPubData":{"type":"object","properties":{"close_out_margin_fraction":{"type":"integer"},"default_initial_margin_fraction":{"type":"integer"},"interest_rate":{"type":"integer"},"liquidation_fee":{"type":"integer"},"maintenance_margin_fraction":{"type":"integer"},"maker_fee":{"type":"integer"},"market_index":{"type":"integer"},"min_base_amount":{"type":"integer"},"min_initial_margin_fraction":{"type":"integer"},"min_quote_amount":{"type":"integer"},"status":{"type":"integer"},"taker_fee":{"type":"integer"}},"required":["close_out_margin_fraction","default_initial_margin_fraction","interest_rate","liquidation_fee","maintenance_margin_fraction","maker_fee","market_index","min_base_amount","min_initial_margin_fraction","min_quote_amount","status","taker_fee"]},"types.L1UpdateSpotMarketPubData":{"type":"object","properties":{"maker_fee":{"type":"integer"},"market_index":{"type":"integer"},"min_base_amount":{"type":"integer"},"min_quote_amount":{"type":"integer"},"order_quote_limit":{"type":"integer"},"status":{"type":"integer"},"taker_fee":{"type":"integer"}},"required":["maker_fee","market_index","min_base_amount","min_quote_amount","order_quote_limit","status","taker_fee"]},"types.L2CreatePublicPoolPubData":{"type":"object","properties":{"account_index":{"type":"integer"},"initial_total_shares":{"type":"integer"},"min_operator_share_rate":{"type":"integer"},"operator_fee":{"type":"integer"},"public_pool_index":{"type":"integer"}},"required":["account_index","initial_total_shares","min_operator_share_rate","operator_fee","public_pool_index"]},"types.L2CreateStakingPoolPubData":{"type":"object","properties":{"account_index":{"type":"integer"},"initial_total_shares":{"type":"integer"},"min_operator_share_rate":{"type":"integer"},"staking_pool_index":{"type":"integer"}},"required":["account_index","initial_total_shares","min_operator_share_rate","staking_pool_index"]},"response.L2CreateSubAccountPubData":{"type":"object","properties":{"account_index":{"type":"string"},"subAccount_index":{"type":"string"}},"required":["account_index","subAccount_index"]},"response.L2MintSharesPubData":{"type":"object","properties":{"account_index":{"type":"string"},"public_pool_index":{"type":"integer"},"share_amount":{"type":"string"},"usdc_amount":{"type":"string"}},"required":["account_index","public_pool_index","share_amount","usdc_amount"]},"response.L2StakeAssetsPubData":{"type":"object","properties":{"account_index":{"type":"string"},"lit_amount":{"type":"string"},"share_amount":{"type":"string"},"staking_pool_index":{"type":"integer"}},"required":["account_index","lit_amount","share_amount","staking_pool_index"]},"response.L2TransferPubData":{"type":"object","properties":{"from_account_index":{"type":"string"},"to_account_index":{"type":"string"},"usdc_amount":{"type":"string"}},"required":["from_account_index","to_account_index","usdc_amount"]},"response.L2TransferPubDataV2":{"type":"object","properties":{"amount":{"type":"string"},"asset_index":{"type":"string"},"fee_account_index":{"type":"string"},"from_account_index":{"type":"string"},"from_route_type":{"type":"string"},"to_account_index":{"type":"string"},"to_route_type":{"type":"string"},"usdc_fee":{"type":"string"}},"required":["amount","asset_index","fee_account_index","from_account_index","from_route_type","to_account_index","to_route_type","usdc_fee"]},"response.L2UpdateAccountConfigPubData":{"type":"object","properties":{"account_index":{"type":"integer"},"account_trading_mode":{"type":"integer"},"asset_amounts":{"type":"array","items":{"$ref":"#/components/schemas/response.UnifiedAsset"}}},"required":["account_index","account_trading_mode","asset_amounts"]},"response.UnifiedAsset":{"type":"object","properties":{"asset_index":{"type":"integer"},"moved_asset_amount":{"type":"string"}},"required":["asset_index","moved_asset_amount"]},"response.L2UpdateLeveragePubData":{"type":"object","properties":{"account_index":{"type":"string"},"initial_margin_fraction":{"type":"integer"},"margin_mode":{"type":"integer"},"market_index":{"type":"integer"}},"required":["account_index","initial_margin_fraction","margin_mode","market_index"]},"response.L2UpdateMarginPubData":{"type":"object","properties":{"account_index":{"type":"string"},"direction":{"type":"integer"},"market_index":{"type":"integer"},"usdc_amount":{"type":"string"}},"required":["account_index","direction","market_index","usdc_amount"]},"types.L2UpdatePublicPoolPubData":{"type":"object","properties":{"min_operator_share_rate":{"type":"integer"},"operator_fee":{"type":"integer"},"public_pool_index":{"type":"integer"},"status":{"type":"integer"}},"required":["min_operator_share_rate","operator_fee","public_pool_index","status"]},"response.TradePubData":{"type":"object","properties":{"fee_account_index":{"type":"string"},"is_taker_ask":{"type":"integer"},"maker_account_index":{"type":"string"},"maker_fee":{"type":"integer"},"market_index":{"type":"integer"},"price":{"type":"string"},"size":{"type":"string"},"taker_account_index":{"type":"string"},"taker_fee":{"type":"integer"},"trade_type":{"type":"integer"}},"required":["fee_account_index","is_taker_ask","maker_account_index","maker_fee","market_index","price","size","taker_account_index","taker_fee","trade_type"]},"response.TradePubDataWithFunding":{"type":"object","properties":{"fee_account_index":{"type":"string"},"funding_rate_prefix_sum":{"type":"integer"},"is_taker_ask":{"type":"integer"},"maker_account_index":{"type":"string"},"maker_fee":{"type":"integer"},"market_index":{"type":"integer"},"price":{"type":"string"},"size":{"type":"string"},"taker_account_index":{"type":"string"},"taker_fee":{"type":"integer"},"trade_type":{"type":"integer"}},"required":["fee_account_index","funding_rate_prefix_sum","is_taker_ask","maker_account_index","maker_fee","market_index","price","size","taker_account_index","taker_fee","trade_type"]},"response.UnstakeAssetsPubData":{"type":"object","properties":{"account_index":{"type":"string"},"lit_amount":{"type":"string"},"share_amount":{"type":"string"},"staking_pool_index":{"type":"integer"}},"required":["account_index","lit_amount","share_amount","staking_pool_index"]},"response.WithdrawPubData":{"type":"object","properties":{"from_account_index":{"type":"string"},"usdc_amount":{"type":"string"}},"required":["from_account_index","usdc_amount"]},"response.WithdrawPubDataV2":{"type":"object","properties":{"amount":{"type":"string"},"asset_index":{"type":"string"},"from_account_index":{"type":"string"},"route_type":{"type":"string"}},"required":["amount","asset_index","from_account_index","route_type"]},"response.PubDataType":{"type":"string","enum":["Empty","L1Deposit","L1CreateMarket","L1UpdateMarket","L2CreateSubAccount","L2CreatePublicPool","L2UpdatePublicPool","L2MintShares","L2UpdateLeverage","L2UpdateMargin","L2Transfer","Withdraw","Trade","TradeWithFunding","LiquidationTrade","LiquidationTradeWithFunding","BurnedShares","ExitPosition","ExitPositionWithFunding","Deleverage","DeleverageWithFunding","L1RegisterAsset","L1UpdateAsset","L1CreateSpotMarket","L1UpdateSpotMarket","WithdrawV2","L1CreateMarketV2","L1DepositV2","L1UpdateMarketV2","L2TransferV2","L2CreateStakingPool","L2UpdateStakingPool","L2StakeAssets","UnstakeAssets","L1SetSystemConfig","ExecutedPendingUnlock","L2UpdateAccountConfig","L2UpdateMarketConfig"]},"response.BatchStatus":{"type":"string","enum":["nothing_to_execute","committed","verified","executed"]},"response.TxType":{"type":"string","enum":["Empty","L1Deposit","L1ChangePubKey","L1CreateMarket","L1UpdateMarket","L1CancelAllOrders","L1Withdraw","L1CreateOrder","L2ChangePubKey","L2CreateSubAccount","L2CreatePublicPool","L2UpdatePublicPool","L2Transfer","L2Withdraw","L2CreateOrder","L2CancelOrder","L2CancelAllOrders","L2ModifyOrder","L2MintShares","L2BurnShares","L2UpdateLeverage","InternalClaimOrder","InternalCancelOrder","InternalDeleverage","InternalExitPosition","InternalCancelAllOrders","InternalLiquidatePosition","InternalCreateOrder","L2CreateGroupedOrders","L2UpdateMargin","L1BurnShares","L1RegisterAsset","L1UpdateAsset","L2CreateStakingPool","L2StakeAssets","L2UnstakeAssets","L1UnstakeAssets","L1SetSystemConfig","InternalPendingUnlock","L2ForceBurnShares","L2UpdateAccountConfig","L2StrategyTransfer","L2UpdateMarketConfig","InternalTransfer","L2ApproveIntegrator"]}}}}
```

## The response.TxType object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"response.TxType":{"type":"string","enum":["Empty","L1Deposit","L1ChangePubKey","L1CreateMarket","L1UpdateMarket","L1CancelAllOrders","L1Withdraw","L1CreateOrder","L2ChangePubKey","L2CreateSubAccount","L2CreatePublicPool","L2UpdatePublicPool","L2Transfer","L2Withdraw","L2CreateOrder","L2CancelOrder","L2CancelAllOrders","L2ModifyOrder","L2MintShares","L2BurnShares","L2UpdateLeverage","InternalClaimOrder","InternalCancelOrder","InternalDeleverage","InternalExitPosition","InternalCancelAllOrders","InternalLiquidatePosition","InternalCreateOrder","L2CreateGroupedOrders","L2UpdateMargin","L1BurnShares","L1RegisterAsset","L1UpdateAsset","L2CreateStakingPool","L2StakeAssets","L2UnstakeAssets","L1UnstakeAssets","L1SetSystemConfig","InternalPendingUnlock","L2ForceBurnShares","L2UpdateAccountConfig","L2StrategyTransfer","L2UpdateMarketConfig","InternalTransfer","L2ApproveIntegrator"]}}}}
```

## The response.UnifiedAsset object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"response.UnifiedAsset":{"type":"object","properties":{"asset_index":{"type":"integer"},"moved_asset_amount":{"type":"string"}},"required":["asset_index","moved_asset_amount"]}}}}
```

## The response.UnstakeAssetsPubData object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"response.UnstakeAssetsPubData":{"type":"object","properties":{"account_index":{"type":"string"},"lit_amount":{"type":"string"},"share_amount":{"type":"string"},"staking_pool_index":{"type":"integer"}},"required":["account_index","lit_amount","share_amount","staking_pool_index"]}}}}
```

## The response.WithdrawPubData object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"response.WithdrawPubData":{"type":"object","properties":{"from_account_index":{"type":"string"},"usdc_amount":{"type":"string"}},"required":["from_account_index","usdc_amount"]}}}}
```

## The response.WithdrawPubDataV2 object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"response.WithdrawPubDataV2":{"type":"object","properties":{"amount":{"type":"string"},"asset_index":{"type":"string"},"from_account_index":{"type":"string"},"route_type":{"type":"string"}},"required":["amount","asset_index","from_account_index","route_type"]}}}}
```

## The types.L1CreateMarketPubData object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"types.L1CreateMarketPubData":{"type":"object","properties":{"close_out_margin_fraction":{"type":"integer"},"default_initial_margin_fraction":{"type":"integer"},"interest_rate":{"type":"integer"},"liquidation_fee":{"type":"integer"},"maintenance_margin_fraction":{"type":"integer"},"maker_fee":{"type":"integer"},"market_index":{"type":"integer"},"min_base_amount":{"type":"integer"},"min_initial_margin_fraction":{"type":"integer"},"min_quote_amount":{"type":"integer"},"quote_multiplier":{"type":"integer"},"taker_fee":{"type":"integer"}},"required":["close_out_margin_fraction","default_initial_margin_fraction","interest_rate","liquidation_fee","maintenance_margin_fraction","maker_fee","market_index","min_base_amount","min_initial_margin_fraction","min_quote_amount","quote_multiplier","taker_fee"]}}}}
```

## The types.L1CreateMarketPubDataV2 object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"types.L1CreateMarketPubDataV2":{"type":"object","properties":{"close_out_margin_fraction":{"type":"integer"},"default_initial_margin_fraction":{"type":"integer"},"funding_clamp_big":{"type":"integer"},"funding_clamp_small":{"type":"integer"},"interest_rate":{"type":"integer"},"liquidation_fee":{"type":"integer"},"maintenance_margin_fraction":{"type":"integer"},"maker_fee":{"type":"integer"},"market_index":{"type":"integer"},"min_base_amount":{"type":"integer"},"min_initial_margin_fraction":{"type":"integer"},"min_quote_amount":{"type":"integer"},"open_interest_limit":{"type":"integer"},"order_quote_limit":{"type":"integer"},"quote_multiplier":{"type":"integer"},"taker_fee":{"type":"integer"}},"required":["close_out_margin_fraction","default_initial_margin_fraction","funding_clamp_big","funding_clamp_small","interest_rate","liquidation_fee","maintenance_margin_fraction","maker_fee","market_index","min_base_amount","min_initial_margin_fraction","min_quote_amount","open_interest_limit","order_quote_limit","quote_multiplier","taker_fee"]}}}}
```

## The types.L1CreateSpotMarketPubData object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"types.L1CreateSpotMarketPubData":{"type":"object","properties":{"base_asset_id":{"type":"integer"},"maker_fee":{"type":"integer"},"market_index":{"type":"integer"},"min_base_amount":{"type":"integer"},"min_quote_amount":{"type":"integer"},"order_quote_limit":{"type":"integer"},"quote_asset_id":{"type":"integer"},"quote_extension_multiplier":{"type":"integer"},"size_extension_multiplier":{"type":"integer"},"taker_fee":{"type":"integer"}},"required":["base_asset_id","maker_fee","market_index","min_base_amount","min_quote_amount","order_quote_limit","quote_asset_id","quote_extension_multiplier","size_extension_multiplier","taker_fee"]}}}}
```

## The types.L1RegisterAssetPubData object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"types.L1RegisterAssetPubData":{"type":"object","properties":{"asset_index":{"type":"integer"},"extension_multiplier":{"type":"integer"},"margin_mode":{"type":"integer"},"min_transfer_amount":{"type":"integer"},"min_withdrawal_amount":{"type":"integer"}},"required":["asset_index","extension_multiplier","margin_mode","min_transfer_amount","min_withdrawal_amount"]}}}}
```

## The types.L1SetSystemConfigPubData object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"types.L1SetSystemConfigPubData":{"type":"object","properties":{"liquidity_pool_cooldown_period":{"type":"integer"},"liquidity_pool_index":{"type":"integer"},"max_integrator_perps_maker_fee":{"type":"integer"},"max_integrator_perps_taker_fee":{"type":"integer"},"max_integrator_spot_maker_fee":{"type":"integer"},"max_integrator_spot_taker_fee":{"type":"integer"},"staking_pool_index":{"type":"integer"},"staking_pool_lockup_period":{"type":"integer"}},"required":["liquidity_pool_cooldown_period","liquidity_pool_index","max_integrator_perps_maker_fee","max_integrator_perps_taker_fee","max_integrator_spot_maker_fee","max_integrator_spot_taker_fee","staking_pool_index","staking_pool_lockup_period"]}}}}
```

## The types.L1UpdateAssetPubData object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"types.L1UpdateAssetPubData":{"type":"object","properties":{"asset_index":{"type":"integer"},"margin_mode":{"type":"integer"},"min_transfer_amount":{"type":"integer"},"min_withdrawal_amount":{"type":"integer"}},"required":["asset_index","margin_mode","min_transfer_amount","min_withdrawal_amount"]}}}}
```

## The types.L1UpdateMarketPubData object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"types.L1UpdateMarketPubData":{"type":"object","properties":{"close_out_margin_fraction":{"type":"integer"},"default_initial_margin_fraction":{"type":"integer"},"interest_rate":{"type":"integer"},"liquidation_fee":{"type":"integer"},"maintenance_margin_fraction":{"type":"integer"},"maker_fee":{"type":"integer"},"market_index":{"type":"integer"},"min_base_amount":{"type":"integer"},"min_initial_margin_fraction":{"type":"integer"},"min_quote_amount":{"type":"integer"},"status":{"type":"integer"},"taker_fee":{"type":"integer"}},"required":["close_out_margin_fraction","default_initial_margin_fraction","interest_rate","liquidation_fee","maintenance_margin_fraction","maker_fee","market_index","min_base_amount","min_initial_margin_fraction","min_quote_amount","status","taker_fee"]}}}}
```

## The types.L1UpdateSpotMarketPubData object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"types.L1UpdateSpotMarketPubData":{"type":"object","properties":{"maker_fee":{"type":"integer"},"market_index":{"type":"integer"},"min_base_amount":{"type":"integer"},"min_quote_amount":{"type":"integer"},"order_quote_limit":{"type":"integer"},"status":{"type":"integer"},"taker_fee":{"type":"integer"}},"required":["maker_fee","market_index","min_base_amount","min_quote_amount","order_quote_limit","status","taker_fee"]}}}}
```

## The types.L2CreatePublicPoolPubData object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"types.L2CreatePublicPoolPubData":{"type":"object","properties":{"account_index":{"type":"integer"},"initial_total_shares":{"type":"integer"},"min_operator_share_rate":{"type":"integer"},"operator_fee":{"type":"integer"},"public_pool_index":{"type":"integer"}},"required":["account_index","initial_total_shares","min_operator_share_rate","operator_fee","public_pool_index"]}}}}
```

## The types.L2CreateStakingPoolPubData object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"types.L2CreateStakingPoolPubData":{"type":"object","properties":{"account_index":{"type":"integer"},"initial_total_shares":{"type":"integer"},"min_operator_share_rate":{"type":"integer"},"staking_pool_index":{"type":"integer"}},"required":["account_index","initial_total_shares","min_operator_share_rate","staking_pool_index"]}}}}
```

## The types.L2UpdatePublicPoolPubData object

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"components":{"schemas":{"types.L2UpdatePublicPoolPubData":{"type":"object","properties":{"min_operator_share_rate":{"type":"integer"},"operator_fee":{"type":"integer"},"public_pool_index":{"type":"integer"},"status":{"type":"integer"}},"required":["min_operator_share_rate","operator_fee","public_pool_index","status"]}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.lighter.xyz/api/models.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
