Skip to content

Commit 035d4d0

Browse files
Add binary options API (events, portfolio/boPnl, upDownCandles) and priceOracleInfo with example
1 parent 04bee9b commit 035d4d0

45 files changed

Lines changed: 5232 additions & 84 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.openapi-generator/FILES‎

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,12 @@ docs/ApiToken.md
1616
docs/ApprovedIntegrator.md
1717
docs/Asset.md
1818
docs/AssetDetails.md
19+
docs/BinaryOptionMarketStats.md
1920
docs/Block.md
2021
docs/BlockApi.md
2122
docs/Blocks.md
23+
docs/BoEventPnL.md
24+
docs/BoOutcomePnL.md
2225
docs/BridgeApi.md
2326
docs/BridgeSupportedNetwork.md
2427
docs/BridgeSupportedNetworks.md
@@ -35,6 +38,9 @@ docs/DepositHistoryItem.md
3538
docs/DetailedAccount.md
3639
docs/DetailedAccounts.md
3740
docs/EnrichedTx.md
41+
docs/EventApi.md
42+
docs/EventDetail.md
43+
docs/EventOrderBookEntry.md
3844
docs/ExchangeMetric.md
3945
docs/ExchangeStats.md
4046
docs/ExecuteStat.md
@@ -80,8 +86,11 @@ docs/PerpsOrderBookDetail.md
8086
docs/PnLEntry.md
8187
docs/PnlLeaderboard.md
8288
docs/PnlLeaderboardEntry.md
89+
docs/PortfolioApi.md
8390
docs/PositionFunding.md
8491
docs/PositionFundings.md
92+
docs/PriceOracleMarket.md
93+
docs/PriceOraclePrice.md
8594
docs/PublicPoolInfo.md
8695
docs/PublicPoolMetadata.md
8796
docs/PublicPoolShare.md
@@ -101,6 +110,8 @@ docs/ReqSetAccountMetadata.md
101110
docs/RespChangeAccountTier.md
102111
docs/RespCreateRFQ.md
103112
docs/RespGetApiTokens.md
113+
docs/RespGetBoPnL.md
114+
docs/RespGetEvents.md
104115
docs/RespGetExchangeMetrics.md
105116
docs/RespGetExecuteStats.md
106117
docs/RespGetFastBridgeInfo.md
@@ -109,8 +120,10 @@ docs/RespGetLeaseOptions.md
109120
docs/RespGetLeases.md
110121
docs/RespGetMakerOnlyApiKeys.md
111122
docs/RespGetRFQ.md
123+
docs/RespGetUpDownCandles.md
112124
docs/RespListRFQs.md
113125
docs/RespPostApiToken.md
126+
docs/RespPriceOracleInfo.md
114127
docs/RespPublicPoolsMetadata.md
115128
docs/RespRespondToRFQ.md
116129
docs/RespRevokeApiToken.md
@@ -148,6 +161,8 @@ docs/TransferHistoryItem.md
148161
docs/Tx.md
149162
docs/TxHash.md
150163
docs/Txs.md
164+
docs/UpDownCandle.md
165+
docs/UpdownApi.md
151166
docs/UserReferrals.md
152167
docs/ValidatorInfo.md
153168
docs/WithdrawHistory.md
@@ -160,15 +175,18 @@ lighter/api/announcement_api.py
160175
lighter/api/block_api.py
161176
lighter/api/bridge_api.py
162177
lighter/api/candlestick_api.py
178+
lighter/api/event_api.py
163179
lighter/api/funding_api.py
164180
lighter/api/info_api.py
165181
lighter/api/livepoints_api.py
166182
lighter/api/notification_api.py
167183
lighter/api/order_api.py
184+
lighter/api/portfolio_api.py
168185
lighter/api/referral_api.py
169186
lighter/api/root_api.py
170187
lighter/api/tokenlist_api.py
171188
lighter/api/transaction_api.py
189+
lighter/api/updown_api.py
172190
lighter/api_client.py
173191
lighter/api_response.py
174192
lighter/configuration.py
@@ -189,8 +207,11 @@ lighter/models/api_token.py
189207
lighter/models/approved_integrator.py
190208
lighter/models/asset.py
191209
lighter/models/asset_details.py
210+
lighter/models/binary_option_market_stats.py
192211
lighter/models/block.py
193212
lighter/models/blocks.py
213+
lighter/models/bo_event_pn_l.py
214+
lighter/models/bo_outcome_pn_l.py
194215
lighter/models/bridge_supported_network.py
195216
lighter/models/bridge_supported_networks.py
196217
lighter/models/candle.py
@@ -205,6 +226,8 @@ lighter/models/deposit_history_item.py
205226
lighter/models/detailed_account.py
206227
lighter/models/detailed_accounts.py
207228
lighter/models/enriched_tx.py
229+
lighter/models/event_detail.py
230+
lighter/models/event_order_book_entry.py
208231
lighter/models/exchange_metric.py
209232
lighter/models/exchange_stats.py
210233
lighter/models/execute_stat.py
@@ -247,6 +270,8 @@ lighter/models/pnl_leaderboard.py
247270
lighter/models/pnl_leaderboard_entry.py
248271
lighter/models/position_funding.py
249272
lighter/models/position_fundings.py
273+
lighter/models/price_oracle_market.py
274+
lighter/models/price_oracle_price.py
250275
lighter/models/public_pool_info.py
251276
lighter/models/public_pool_metadata.py
252277
lighter/models/public_pool_share.py
@@ -262,6 +287,8 @@ lighter/models/req_set_account_metadata.py
262287
lighter/models/resp_change_account_tier.py
263288
lighter/models/resp_create_rfq.py
264289
lighter/models/resp_get_api_tokens.py
290+
lighter/models/resp_get_bo_pn_l.py
291+
lighter/models/resp_get_events.py
265292
lighter/models/resp_get_exchange_metrics.py
266293
lighter/models/resp_get_execute_stats.py
267294
lighter/models/resp_get_fast_bridge_info.py
@@ -270,8 +297,10 @@ lighter/models/resp_get_lease_options.py
270297
lighter/models/resp_get_leases.py
271298
lighter/models/resp_get_maker_only_api_keys.py
272299
lighter/models/resp_get_rfq.py
300+
lighter/models/resp_get_up_down_candles.py
273301
lighter/models/resp_list_rfqs.py
274302
lighter/models/resp_post_api_token.py
303+
lighter/models/resp_price_oracle_info.py
275304
lighter/models/resp_public_pools_metadata.py
276305
lighter/models/resp_respond_to_rfq.py
277306
lighter/models/resp_revoke_api_token.py
@@ -309,6 +338,7 @@ lighter/models/transfer_history_item.py
309338
lighter/models/tx.py
310339
lighter/models/tx_hash.py
311340
lighter/models/txs.py
341+
lighter/models/up_down_candle.py
312342
lighter/models/user_referrals.py
313343
lighter/models/validator_info.py
314344
lighter/models/withdraw_history.py

‎README.md‎

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,10 @@ Class | Method | HTTP request | Description
9797
*CandlestickApi* | [**fundings**](docs/CandlestickApi.md#fundings) | **GET** /api/v1/fundings | fundings
9898
*CandlestickApi* | [**mark_price_candles**](docs/CandlestickApi.md#mark_price_candles) | **GET** /api/v1/markPriceCandles | markPriceCandles
9999
*CandlestickApi* | [**market_price_charts**](docs/CandlestickApi.md#market_price_charts) | **GET** /api/v1/marketPriceCharts | marketPriceCharts
100+
*EventApi* | [**events**](docs/EventApi.md#events) | **GET** /api/v1/events | events
100101
*FundingApi* | [**funding_rates**](docs/FundingApi.md#funding_rates) | **GET** /api/v1/funding-rates | funding-rates
101102
*InfoApi* | [**layer1_basic_info**](docs/InfoApi.md#layer1_basic_info) | **GET** /api/v1/layer1BasicInfo | layer1BasicInfo
103+
*InfoApi* | [**price_oracle_info**](docs/InfoApi.md#price_oracle_info) | **GET** /api/v1/priceOracleInfo | priceOracleInfo
102104
*InfoApi* | [**synthetic_spot_info**](docs/InfoApi.md#synthetic_spot_info) | **GET** /api/v1/syntheticSpotInfo | syntheticSpotInfo
103105
*InfoApi* | [**system_config**](docs/InfoApi.md#system_config) | **GET** /api/v1/systemConfig | systemConfig
104106
*InfoApi* | [**transfer_fee_info**](docs/InfoApi.md#transfer_fee_info) | **GET** /api/v1/transferFeeInfo | transferFeeInfo
@@ -111,14 +113,15 @@ Class | Method | HTTP request | Description
111113
*OrderApi* | [**asset_details**](docs/OrderApi.md#asset_details) | **GET** /api/v1/assetDetails | assetDetails
112114
*OrderApi* | [**exchange_metrics**](docs/OrderApi.md#exchange_metrics) | **GET** /api/v1/exchangeMetrics | exchangeMetrics
113115
*OrderApi* | [**exchange_stats**](docs/OrderApi.md#exchange_stats) | **GET** /api/v1/exchangeStats | exchangeStats
114-
*OrderApi* | [**export_historical_trades**](docs/OrderApi.md#export_historical_trades) | **GET** /api/v1/export/historicalTrades | export_historicalTrades
115116
*OrderApi* | [**execute_stats**](docs/OrderApi.md#execute_stats) | **GET** /api/v1/executeStats | executeStats
116117
*OrderApi* | [**export**](docs/OrderApi.md#export) | **GET** /api/v1/export | export
118+
*OrderApi* | [**export_historical_trades**](docs/OrderApi.md#export_historical_trades) | **GET** /api/v1/export/historicalTrades | export_historicalTrades
117119
*OrderApi* | [**order_book_details**](docs/OrderApi.md#order_book_details) | **GET** /api/v1/orderBookDetails | orderBookDetails
118120
*OrderApi* | [**order_book_orders**](docs/OrderApi.md#order_book_orders) | **GET** /api/v1/orderBookOrders | orderBookOrders
119121
*OrderApi* | [**order_books**](docs/OrderApi.md#order_books) | **GET** /api/v1/orderBooks | orderBooks
120122
*OrderApi* | [**recent_trades**](docs/OrderApi.md#recent_trades) | **GET** /api/v1/recentTrades | recentTrades
121123
*OrderApi* | [**trades**](docs/OrderApi.md#trades) | **GET** /api/v1/trades | trades
124+
*PortfolioApi* | [**portfolio_bo_pnl**](docs/PortfolioApi.md#portfolio_bo_pnl) | **GET** /api/v1/portfolio/boPnl | portfolio_boPnl
122125
*ReferralApi* | [**referral_create**](docs/ReferralApi.md#referral_create) | **POST** /api/v1/referral/create | referral_create
123126
*ReferralApi* | [**referral_get**](docs/ReferralApi.md#referral_get) | **GET** /api/v1/referral/get | referral_get
124127
*ReferralApi* | [**referral_kickback_update**](docs/ReferralApi.md#referral_kickback_update) | **POST** /api/v1/referral/kickback/update | referral_kickback_update
@@ -141,6 +144,7 @@ Class | Method | HTTP request | Description
141144
*TransactionApi* | [**tx_from_l1_tx_hash**](docs/TransactionApi.md#tx_from_l1_tx_hash) | **GET** /api/v1/txFromL1TxHash | txFromL1TxHash
142145
*TransactionApi* | [**txs**](docs/TransactionApi.md#txs) | **GET** /api/v1/txs | txs
143146
*TransactionApi* | [**withdraw_history**](docs/TransactionApi.md#withdraw_history) | **GET** /api/v1/withdraw/history | withdraw_history
147+
*UpdownApi* | [**up_down_candles**](docs/UpdownApi.md#up_down_candles) | **GET** /api/v1/upDownCandles | upDownCandles
144148
<!-- /AUTOGEN:API_ENDPOINTS -->
145149

146150
<!-- AUTOGEN:MODELS -->
@@ -159,8 +163,11 @@ Class | Method | HTTP request | Description
159163
- [ApprovedIntegrator](docs/ApprovedIntegrator.md)
160164
- [Asset](docs/Asset.md)
161165
- [AssetDetails](docs/AssetDetails.md)
166+
- [BinaryOptionMarketStats](docs/BinaryOptionMarketStats.md)
162167
- [Block](docs/Block.md)
163168
- [Blocks](docs/Blocks.md)
169+
- [BoEventPnL](docs/BoEventPnL.md)
170+
- [BoOutcomePnL](docs/BoOutcomePnL.md)
164171
- [BridgeSupportedNetwork](docs/BridgeSupportedNetwork.md)
165172
- [BridgeSupportedNetworks](docs/BridgeSupportedNetworks.md)
166173
- [Candle](docs/Candle.md)
@@ -175,15 +182,17 @@ Class | Method | HTTP request | Description
175182
- [DetailedAccount](docs/DetailedAccount.md)
176183
- [DetailedAccounts](docs/DetailedAccounts.md)
177184
- [EnrichedTx](docs/EnrichedTx.md)
185+
- [EventDetail](docs/EventDetail.md)
186+
- [EventOrderBookEntry](docs/EventOrderBookEntry.md)
178187
- [ExchangeMetric](docs/ExchangeMetric.md)
179188
- [ExchangeStats](docs/ExchangeStats.md)
180189
- [ExecuteStat](docs/ExecuteStat.md)
181190
- [ExportData](docs/ExportData.md)
182191
- [Funding](docs/Funding.md)
183192
- [FundingRate](docs/FundingRate.md)
184193
- [FundingRates](docs/FundingRates.md)
185-
- [HistoricalTradesExportData](docs/HistoricalTradesExportData.md)
186194
- [Fundings](docs/Fundings.md)
195+
- [HistoricalTradesExportData](docs/HistoricalTradesExportData.md)
187196
- [L1Metadata](docs/L1Metadata.md)
188197
- [L1ProviderInfo](docs/L1ProviderInfo.md)
189198
- [Layer1BasicInfo](docs/Layer1BasicInfo.md)
@@ -212,29 +221,33 @@ Class | Method | HTTP request | Description
212221
- [PartnerStats](docs/PartnerStats.md)
213222
- [PendingUnlock](docs/PendingUnlock.md)
214223
- [PerpsOrderBookDetail](docs/PerpsOrderBookDetail.md)
224+
- [PnLEntry](docs/PnLEntry.md)
215225
- [PnlLeaderboard](docs/PnlLeaderboard.md)
216226
- [PnlLeaderboardEntry](docs/PnlLeaderboardEntry.md)
217-
- [PnLEntry](docs/PnLEntry.md)
218227
- [PositionFunding](docs/PositionFunding.md)
219228
- [PositionFundings](docs/PositionFundings.md)
229+
- [PriceOracleMarket](docs/PriceOracleMarket.md)
230+
- [PriceOraclePrice](docs/PriceOraclePrice.md)
220231
- [PublicPoolInfo](docs/PublicPoolInfo.md)
221232
- [PublicPoolMetadata](docs/PublicPoolMetadata.md)
222233
- [PublicPoolShare](docs/PublicPoolShare.md)
223234
- [RFQEntry](docs/RFQEntry.md)
224235
- [RFQMetadata](docs/RFQMetadata.md)
225236
- [RFQResponseEntry](docs/RFQResponseEntry.md)
226237
- [Referral](docs/Referral.md)
227-
- [ReferralStat](docs/ReferralStat.md)
228-
- [ReferralStats](docs/ReferralStats.md)
229238
- [ReferralCode](docs/ReferralCode.md)
230239
- [ReferralPointEntry](docs/ReferralPointEntry.md)
231240
- [ReferralPoints](docs/ReferralPoints.md)
232241
- [ReferralProgramKickback](docs/ReferralProgramKickback.md)
242+
- [ReferralStat](docs/ReferralStat.md)
243+
- [ReferralStats](docs/ReferralStats.md)
233244
- [ReferralTotals](docs/ReferralTotals.md)
234245
- [ReqSetAccountMetadata](docs/ReqSetAccountMetadata.md)
235246
- [RespChangeAccountTier](docs/RespChangeAccountTier.md)
236247
- [RespCreateRFQ](docs/RespCreateRFQ.md)
237248
- [RespGetApiTokens](docs/RespGetApiTokens.md)
249+
- [RespGetBoPnL](docs/RespGetBoPnL.md)
250+
- [RespGetEvents](docs/RespGetEvents.md)
238251
- [RespGetExchangeMetrics](docs/RespGetExchangeMetrics.md)
239252
- [RespGetExecuteStats](docs/RespGetExecuteStats.md)
240253
- [RespGetFastBridgeInfo](docs/RespGetFastBridgeInfo.md)
@@ -243,8 +256,10 @@ Class | Method | HTTP request | Description
243256
- [RespGetLeases](docs/RespGetLeases.md)
244257
- [RespGetMakerOnlyApiKeys](docs/RespGetMakerOnlyApiKeys.md)
245258
- [RespGetRFQ](docs/RespGetRFQ.md)
259+
- [RespGetUpDownCandles](docs/RespGetUpDownCandles.md)
246260
- [RespListRFQs](docs/RespListRFQs.md)
247261
- [RespPostApiToken](docs/RespPostApiToken.md)
262+
- [RespPriceOracleInfo](docs/RespPriceOracleInfo.md)
248263
- [RespPublicPoolsMetadata](docs/RespPublicPoolsMetadata.md)
249264
- [RespRespondToRFQ](docs/RespRespondToRFQ.md)
250265
- [RespRevokeApiToken](docs/RespRevokeApiToken.md)
@@ -279,6 +294,7 @@ Class | Method | HTTP request | Description
279294
- [Tx](docs/Tx.md)
280295
- [TxHash](docs/TxHash.md)
281296
- [Txs](docs/Txs.md)
297+
- [UpDownCandle](docs/UpDownCandle.md)
282298
- [UserReferrals](docs/UserReferrals.md)
283299
- [ValidatorInfo](docs/ValidatorInfo.md)
284300
- [WithdrawHistory](docs/WithdrawHistory.md)

‎docs/AccountApi.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ No authorization required
402402
403403
changeAccountTier
404404

405-
Change account type (applies to both master, and subaccounts). Downgrades can be performed once every 24 hours.
405+
Change account tier. You can only perform this action once every 24 hours.
406406

407407
### Example
408408

‎docs/BinaryOptionMarketStats.md‎

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# BinaryOptionMarketStats
2+
3+
4+
## Properties
5+
6+
Name | Type | Description | Notes
7+
------------ | ------------- | ------------- | -------------
8+
**symbol** | **str** | |
9+
**market_id** | **int** | |
10+
**mid_price** | **str** | |
11+
**best_ask_price** | **str** | |
12+
**best_bid_price** | **str** | |
13+
**last_trade_price** | **str** | |
14+
**daily_base_token_volume** | **float** | |
15+
**daily_quote_token_volume** | **float** | |
16+
**daily_price_low** | **float** | |
17+
**daily_price_high** | **float** | |
18+
**daily_price_change** | **float** | |
19+
**lifetime_quote_token_volume** | **float** | |
20+
**lifetime_base_token_volume** | **float** | outcome shares traded over the market&#39;s life |
21+
**open_interest** | **str** | |
22+
**status** | **str** | inactive once the trading window closes |
23+
**outcome** | **int** | |
24+
25+
## Example
26+
27+
```python
28+
from lighter.models.binary_option_market_stats import BinaryOptionMarketStats
29+
30+
# TODO update the JSON string below
31+
json = "{}"
32+
# create an instance of BinaryOptionMarketStats from a JSON string
33+
binary_option_market_stats_instance = BinaryOptionMarketStats.from_json(json)
34+
# print the JSON string representation of the object
35+
print(BinaryOptionMarketStats.to_json())
36+
37+
# convert the object into a dict
38+
binary_option_market_stats_dict = binary_option_market_stats_instance.to_dict()
39+
# create an instance of BinaryOptionMarketStats from a dict
40+
binary_option_market_stats_from_dict = BinaryOptionMarketStats.from_dict(binary_option_market_stats_dict)
41+
```
42+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
43+
44+

‎docs/BoEventPnL.md‎

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# BoEventPnL
2+
3+
4+
## Properties
5+
6+
Name | Type | Description | Notes
7+
------------ | ------------- | ------------- | -------------
8+
**event_id** | **int** | |
9+
**event_title** | **str** | |
10+
**event_description** | **str** | |
11+
**total_pnl** | **str** | |
12+
**outcomes** | [**List[BoOutcomePnL]**](BoOutcomePnL.md) | |
13+
14+
## Example
15+
16+
```python
17+
from lighter.models.bo_event_pn_l import BoEventPnL
18+
19+
# TODO update the JSON string below
20+
json = "{}"
21+
# create an instance of BoEventPnL from a JSON string
22+
bo_event_pn_l_instance = BoEventPnL.from_json(json)
23+
# print the JSON string representation of the object
24+
print(BoEventPnL.to_json())
25+
26+
# convert the object into a dict
27+
bo_event_pn_l_dict = bo_event_pn_l_instance.to_dict()
28+
# create an instance of BoEventPnL from a dict
29+
bo_event_pn_l_from_dict = BoEventPnL.from_dict(bo_event_pn_l_dict)
30+
```
31+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
32+
33+

‎docs/BoOutcomePnL.md‎

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# BoOutcomePnL
2+
3+
4+
## Properties
5+
6+
Name | Type | Description | Notes
7+
------------ | ------------- | ------------- | -------------
8+
**market_id** | **int** | |
9+
**symbol** | **str** | |
10+
**outcome** | **int** | |
11+
**end_timestamp** | **int** | |
12+
**settlement_pnl** | **str** | |
13+
**last_trade_id** | **int** | |
14+
**total_pnl** | **str** | |
15+
16+
## Example
17+
18+
```python
19+
from lighter.models.bo_outcome_pn_l import BoOutcomePnL
20+
21+
# TODO update the JSON string below
22+
json = "{}"
23+
# create an instance of BoOutcomePnL from a JSON string
24+
bo_outcome_pn_l_instance = BoOutcomePnL.from_json(json)
25+
# print the JSON string representation of the object
26+
print(BoOutcomePnL.to_json())
27+
28+
# convert the object into a dict
29+
bo_outcome_pn_l_dict = bo_outcome_pn_l_instance.to_dict()
30+
# create an instance of BoOutcomePnL from a dict
31+
bo_outcome_pn_l_from_dict = BoOutcomePnL.from_dict(bo_outcome_pn_l_dict)
32+
```
33+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
34+
35+

0 commit comments

Comments
 (0)