From b2a61eb45249979655010e0d7adf26e2b000685d Mon Sep 17 00:00:00 2001 From: arturbeg Date: Wed, 11 Mar 2026 21:23:45 +0000 Subject: [PATCH 1/2] feat: update specs --- specs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specs b/specs index d98ff28..18facf1 160000 --- a/specs +++ b/specs @@ -1 +1 @@ -Subproject commit d98ff28bb86dfc1bb4d6ecbd3ad451201157d33c +Subproject commit 18facf1dd25eb406a3be9abdfb6d795b3a5e4809 From 8321bc8e544dceccc0a0602e1338716a2ca59f38 Mon Sep 17 00:00:00 2001 From: arturbeg Date: Wed, 11 Mar 2026 21:34:51 +0000 Subject: [PATCH 2/2] feat: trade bust support --- .openapi-generator/FILES | 2 + .../market_spot_trade_bust_update_payload.py | 10 + sdk/async_api/spot_trade_bust.py | 48 +++ .../wallet_spot_trade_bust_update_payload.py | 10 + sdk/open_api/__init__.py | 6 +- sdk/open_api/api/market_data_api.py | 303 +++++++++++++++++- sdk/open_api/api/order_entry_api.py | 2 +- sdk/open_api/api/reference_data_api.py | 2 +- sdk/open_api/api/specs_api.py | 2 +- sdk/open_api/api/wallet_data_api.py | 303 +++++++++++++++++- sdk/open_api/api_client.py | 2 +- sdk/open_api/configuration.py | 4 +- sdk/open_api/exceptions.py | 2 +- sdk/open_api/models/__init__.py | 4 +- sdk/open_api/models/account.py | 2 +- sdk/open_api/models/account_balance.py | 2 +- sdk/open_api/models/account_type.py | 2 +- sdk/open_api/models/asset_definition.py | 2 +- sdk/open_api/models/cancel_order_request.py | 2 +- sdk/open_api/models/cancel_order_response.py | 2 +- sdk/open_api/models/candle_history_data.py | 2 +- sdk/open_api/models/create_order_request.py | 2 +- sdk/open_api/models/create_order_response.py | 2 +- sdk/open_api/models/depth.py | 2 +- sdk/open_api/models/depth_type.py | 2 +- sdk/open_api/models/execution_type.py | 2 +- sdk/open_api/models/fee_tier_parameters.py | 2 +- sdk/open_api/models/global_fee_parameters.py | 2 +- sdk/open_api/models/level.py | 2 +- sdk/open_api/models/liquidity_parameters.py | 2 +- sdk/open_api/models/market_definition.py | 2 +- sdk/open_api/models/market_summary.py | 2 +- sdk/open_api/models/mass_cancel_request.py | 2 +- sdk/open_api/models/mass_cancel_response.py | 2 +- sdk/open_api/models/order.py | 2 +- sdk/open_api/models/order_status.py | 2 +- sdk/open_api/models/order_type.py | 2 +- sdk/open_api/models/pagination_meta.py | 2 +- sdk/open_api/models/perp_execution.py | 2 +- sdk/open_api/models/perp_execution_list.py | 2 +- sdk/open_api/models/position.py | 2 +- sdk/open_api/models/price.py | 2 +- sdk/open_api/models/request_error.py | 2 +- sdk/open_api/models/request_error_code.py | 2 +- sdk/open_api/models/server_error.py | 2 +- sdk/open_api/models/server_error_code.py | 2 +- sdk/open_api/models/side.py | 2 +- sdk/open_api/models/spot_execution.py | 2 +- sdk/open_api/models/spot_execution_list.py | 2 +- sdk/open_api/models/spot_market_definition.py | 2 +- sdk/open_api/models/spot_trade_bust.py | 139 ++++++++ sdk/open_api/models/spot_trade_bust_list.py | 114 +++++++ sdk/open_api/models/tier_type.py | 2 +- sdk/open_api/models/time_in_force.py | 2 +- sdk/open_api/models/wallet_configuration.py | 2 +- sdk/open_api/rest.py | 2 +- sdk/reya_rest_api/client.py | 17 + 57 files changed, 999 insertions(+), 51 deletions(-) create mode 100644 sdk/async_api/market_spot_trade_bust_update_payload.py create mode 100644 sdk/async_api/spot_trade_bust.py create mode 100644 sdk/async_api/wallet_spot_trade_bust_update_payload.py create mode 100644 sdk/open_api/models/spot_trade_bust.py create mode 100644 sdk/open_api/models/spot_trade_bust_list.py diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index b533014..6a02cf2 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -47,6 +47,8 @@ sdk/open_api/models/side.py sdk/open_api/models/spot_execution.py sdk/open_api/models/spot_execution_list.py sdk/open_api/models/spot_market_definition.py +sdk/open_api/models/spot_trade_bust.py +sdk/open_api/models/spot_trade_bust_list.py sdk/open_api/models/tier_type.py sdk/open_api/models/time_in_force.py sdk/open_api/models/wallet_configuration.py diff --git a/sdk/async_api/market_spot_trade_bust_update_payload.py b/sdk/async_api/market_spot_trade_bust_update_payload.py new file mode 100644 index 0000000..bf9e11b --- /dev/null +++ b/sdk/async_api/market_spot_trade_bust_update_payload.py @@ -0,0 +1,10 @@ +from __future__ import annotations +from typing import Any, List, Dict, Optional +from pydantic import BaseModel, Field +from sdk.async_api.channel_data_message_type import ChannelDataMessageType +from sdk.async_api.spot_trade_bust import SpotTradeBust +class MarketSpotTradeBustUpdatePayload(BaseModel): + type: ChannelDataMessageType = Field(description='''Message type for channel data updates''') + timestamp: float = Field(description='''Update timestamp (milliseconds)''') + channel: str = Field(description='''Channel pattern for market spot trade busts''') + data: List[SpotTradeBust] = Field() diff --git a/sdk/async_api/spot_trade_bust.py b/sdk/async_api/spot_trade_bust.py new file mode 100644 index 0000000..3e29cf9 --- /dev/null +++ b/sdk/async_api/spot_trade_bust.py @@ -0,0 +1,48 @@ +from __future__ import annotations +from typing import Any, Dict, Optional +from pydantic import model_serializer, model_validator, BaseModel, Field +from sdk.async_api.side import Side +class SpotTradeBust(BaseModel): + symbol: str = Field(description='''Trading symbol (e.g., BTCRUSDPERP, WETHRUSD)''') + account_id: int = Field(alias='''accountId''') + counterparty_account_id: int = Field(alias='''counterpartyAccountId''') + qty: str = Field() + side: Side = Field(description='''Order side (B = Buy/Bid, A = Ask/Sell)''') + price: str = Field() + reason: str = Field(description='''Hex-encoded revert reason bytes''') + timestamp: int = Field() + transaction_hash: str = Field(description='''Transaction hash''', alias='''transactionHash''') + additional_properties: Optional[dict[str, Any]] = Field(default=None, exclude=True) + + @model_serializer(mode='wrap') + def custom_serializer(self, handler): + serialized_self = handler(self) + additional_properties = getattr(self, "additional_properties") + if additional_properties is not None: + for key, value in additional_properties.items(): + # Never overwrite existing values, to avoid clashes + if not key in serialized_self: + serialized_self[key] = value + + return serialized_self + + @model_validator(mode='before') + @classmethod + def unwrap_additional_properties(cls, data): + if not isinstance(data, dict): + data = data.model_dump() + json_properties = list(data.keys()) + known_object_properties = ['symbol', 'account_id', 'counterparty_account_id', 'qty', 'side', 'price', 'reason', 'timestamp', 'transaction_hash', 'additional_properties'] + unknown_object_properties = [element for element in json_properties if element not in known_object_properties] + # Ignore attempts that validate regular models, only when unknown input is used we add unwrap extensions + if len(unknown_object_properties) == 0: + return data + + known_json_properties = ['symbol', 'accountId', 'counterpartyAccountId', 'qty', 'side', 'price', 'reason', 'timestamp', 'transactionHash', 'additionalProperties'] + additional_properties = data.get('additional_properties', {}) + for obj_key in unknown_object_properties: + if not known_json_properties.__contains__(obj_key): + additional_properties[obj_key] = data.pop(obj_key, None) + data['additional_properties'] = additional_properties + return data + diff --git a/sdk/async_api/wallet_spot_trade_bust_update_payload.py b/sdk/async_api/wallet_spot_trade_bust_update_payload.py new file mode 100644 index 0000000..4732971 --- /dev/null +++ b/sdk/async_api/wallet_spot_trade_bust_update_payload.py @@ -0,0 +1,10 @@ +from __future__ import annotations +from typing import Any, List, Dict, Optional +from pydantic import BaseModel, Field +from sdk.async_api.channel_data_message_type import ChannelDataMessageType +from sdk.async_api.spot_trade_bust import SpotTradeBust +class WalletSpotTradeBustUpdatePayload(BaseModel): + type: ChannelDataMessageType = Field(description='''Message type for channel data updates''') + timestamp: float = Field(description='''Update timestamp (milliseconds)''') + channel: str = Field(description='''Channel pattern for wallet spot trade busts''') + data: List[SpotTradeBust] = Field() diff --git a/sdk/open_api/__init__.py b/sdk/open_api/__init__.py index b3e943e..2379e9e 100644 --- a/sdk/open_api/__init__.py +++ b/sdk/open_api/__init__.py @@ -7,7 +7,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - The version of the OpenAPI document: 2.1.4 + The version of the OpenAPI document: 2.1.5 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -68,6 +68,8 @@ "SpotExecution", "SpotExecutionList", "SpotMarketDefinition", + "SpotTradeBust", + "SpotTradeBustList", "TierType", "TimeInForce", "WalletConfiguration", @@ -128,6 +130,8 @@ from sdk.open_api.models.spot_execution import SpotExecution as SpotExecution from sdk.open_api.models.spot_execution_list import SpotExecutionList as SpotExecutionList from sdk.open_api.models.spot_market_definition import SpotMarketDefinition as SpotMarketDefinition +from sdk.open_api.models.spot_trade_bust import SpotTradeBust as SpotTradeBust +from sdk.open_api.models.spot_trade_bust_list import SpotTradeBustList as SpotTradeBustList from sdk.open_api.models.tier_type import TierType as TierType from sdk.open_api.models.time_in_force import TimeInForce as TimeInForce from sdk.open_api.models.wallet_configuration import WalletConfiguration as WalletConfiguration diff --git a/sdk/open_api/api/market_data_api.py b/sdk/open_api/api/market_data_api.py index 98e2575..356b62b 100644 --- a/sdk/open_api/api/market_data_api.py +++ b/sdk/open_api/api/market_data_api.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - The version of the OpenAPI document: 2.1.4 + The version of the OpenAPI document: 2.1.5 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -25,6 +25,7 @@ from sdk.open_api.models.perp_execution_list import PerpExecutionList from sdk.open_api.models.price import Price from sdk.open_api.models.spot_execution_list import SpotExecutionList +from sdk.open_api.models.spot_trade_bust_list import SpotTradeBustList from sdk.open_api.api_client import ApiClient, RequestSerialized from sdk.open_api.api_response import ApiResponse @@ -1208,6 +1209,306 @@ def _get_market_spot_executions_serialize( + @validate_call + async def get_market_spot_trade_busts( + self, + symbol: Annotated[str, Field(strict=True, description="Trading symbol (e.g., BTCRUSDPERP)")], + start_time: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Return results after this sequence number (for pagination)")] = None, + end_time: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Return results before this sequence number (for pagination)")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SpotTradeBustList: + """Get spot trade busts for market + + Returns up to 100 spot trade busts (failed spot fills) for a given market. + + :param symbol: Trading symbol (e.g., BTCRUSDPERP) (required) + :type symbol: str + :param start_time: Return results after this sequence number (for pagination) + :type start_time: int + :param end_time: Return results before this sequence number (for pagination) + :type end_time: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_market_spot_trade_busts_serialize( + symbol=symbol, + start_time=start_time, + end_time=end_time, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SpotTradeBustList", + '400': "RequestError", + '500': "ServerError", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_market_spot_trade_busts_with_http_info( + self, + symbol: Annotated[str, Field(strict=True, description="Trading symbol (e.g., BTCRUSDPERP)")], + start_time: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Return results after this sequence number (for pagination)")] = None, + end_time: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Return results before this sequence number (for pagination)")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SpotTradeBustList]: + """Get spot trade busts for market + + Returns up to 100 spot trade busts (failed spot fills) for a given market. + + :param symbol: Trading symbol (e.g., BTCRUSDPERP) (required) + :type symbol: str + :param start_time: Return results after this sequence number (for pagination) + :type start_time: int + :param end_time: Return results before this sequence number (for pagination) + :type end_time: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_market_spot_trade_busts_serialize( + symbol=symbol, + start_time=start_time, + end_time=end_time, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SpotTradeBustList", + '400': "RequestError", + '500': "ServerError", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_market_spot_trade_busts_without_preload_content( + self, + symbol: Annotated[str, Field(strict=True, description="Trading symbol (e.g., BTCRUSDPERP)")], + start_time: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Return results after this sequence number (for pagination)")] = None, + end_time: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Return results before this sequence number (for pagination)")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get spot trade busts for market + + Returns up to 100 spot trade busts (failed spot fills) for a given market. + + :param symbol: Trading symbol (e.g., BTCRUSDPERP) (required) + :type symbol: str + :param start_time: Return results after this sequence number (for pagination) + :type start_time: int + :param end_time: Return results before this sequence number (for pagination) + :type end_time: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_market_spot_trade_busts_serialize( + symbol=symbol, + start_time=start_time, + end_time=end_time, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SpotTradeBustList", + '400': "RequestError", + '500': "ServerError", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_market_spot_trade_busts_serialize( + self, + symbol, + start_time, + end_time, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if symbol is not None: + _path_params['symbol'] = symbol + # process the query parameters + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/market/{symbol}/spotTradeBusts', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call async def get_market_summary( self, diff --git a/sdk/open_api/api/order_entry_api.py b/sdk/open_api/api/order_entry_api.py index 363c240..f664059 100644 --- a/sdk/open_api/api/order_entry_api.py +++ b/sdk/open_api/api/order_entry_api.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - The version of the OpenAPI document: 2.1.4 + The version of the OpenAPI document: 2.1.5 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/sdk/open_api/api/reference_data_api.py b/sdk/open_api/api/reference_data_api.py index cc4a859..92d67e2 100644 --- a/sdk/open_api/api/reference_data_api.py +++ b/sdk/open_api/api/reference_data_api.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - The version of the OpenAPI document: 2.1.4 + The version of the OpenAPI document: 2.1.5 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/sdk/open_api/api/specs_api.py b/sdk/open_api/api/specs_api.py index f953446..8e0fbe4 100644 --- a/sdk/open_api/api/specs_api.py +++ b/sdk/open_api/api/specs_api.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - The version of the OpenAPI document: 2.1.4 + The version of the OpenAPI document: 2.1.5 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/sdk/open_api/api/wallet_data_api.py b/sdk/open_api/api/wallet_data_api.py index 245f00e..ba5c76a 100644 --- a/sdk/open_api/api/wallet_data_api.py +++ b/sdk/open_api/api/wallet_data_api.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - The version of the OpenAPI document: 2.1.4 + The version of the OpenAPI document: 2.1.5 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -25,6 +25,7 @@ from sdk.open_api.models.perp_execution_list import PerpExecutionList from sdk.open_api.models.position import Position from sdk.open_api.models.spot_execution_list import SpotExecutionList +from sdk.open_api.models.spot_trade_bust_list import SpotTradeBustList from sdk.open_api.models.wallet_configuration import WalletConfiguration from sdk.open_api.api_client import ApiClient, RequestSerialized @@ -1967,3 +1968,303 @@ def _get_wallet_spot_executions_serialize( ) + + + @validate_call + async def get_wallet_spot_trade_busts( + self, + address: Annotated[str, Field(strict=True)], + start_time: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Return results after this sequence number (for pagination)")] = None, + end_time: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Return results before this sequence number (for pagination)")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SpotTradeBustList: + """Get wallet spot trade busts + + Returns up to 100 spot trade busts (failed spot fills) for a given wallet. + + :param address: (required) + :type address: str + :param start_time: Return results after this sequence number (for pagination) + :type start_time: int + :param end_time: Return results before this sequence number (for pagination) + :type end_time: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_wallet_spot_trade_busts_serialize( + address=address, + start_time=start_time, + end_time=end_time, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SpotTradeBustList", + '400': "RequestError", + '500': "ServerError", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_wallet_spot_trade_busts_with_http_info( + self, + address: Annotated[str, Field(strict=True)], + start_time: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Return results after this sequence number (for pagination)")] = None, + end_time: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Return results before this sequence number (for pagination)")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SpotTradeBustList]: + """Get wallet spot trade busts + + Returns up to 100 spot trade busts (failed spot fills) for a given wallet. + + :param address: (required) + :type address: str + :param start_time: Return results after this sequence number (for pagination) + :type start_time: int + :param end_time: Return results before this sequence number (for pagination) + :type end_time: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_wallet_spot_trade_busts_serialize( + address=address, + start_time=start_time, + end_time=end_time, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SpotTradeBustList", + '400': "RequestError", + '500': "ServerError", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_wallet_spot_trade_busts_without_preload_content( + self, + address: Annotated[str, Field(strict=True)], + start_time: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Return results after this sequence number (for pagination)")] = None, + end_time: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Return results before this sequence number (for pagination)")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get wallet spot trade busts + + Returns up to 100 spot trade busts (failed spot fills) for a given wallet. + + :param address: (required) + :type address: str + :param start_time: Return results after this sequence number (for pagination) + :type start_time: int + :param end_time: Return results before this sequence number (for pagination) + :type end_time: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_wallet_spot_trade_busts_serialize( + address=address, + start_time=start_time, + end_time=end_time, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SpotTradeBustList", + '400': "RequestError", + '500': "ServerError", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_wallet_spot_trade_busts_serialize( + self, + address, + start_time, + end_time, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if address is not None: + _path_params['address'] = address + # process the query parameters + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/wallet/{address}/spotTradeBusts', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/sdk/open_api/api_client.py b/sdk/open_api/api_client.py index f84f385..406de8e 100644 --- a/sdk/open_api/api_client.py +++ b/sdk/open_api/api_client.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - The version of the OpenAPI document: 2.1.4 + The version of the OpenAPI document: 2.1.5 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/sdk/open_api/configuration.py b/sdk/open_api/configuration.py index 60bdb6e..22aa2e4 100644 --- a/sdk/open_api/configuration.py +++ b/sdk/open_api/configuration.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - The version of the OpenAPI document: 2.1.4 + The version of the OpenAPI document: 2.1.5 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -496,7 +496,7 @@ def to_debug_report(self) -> str: return "Python SDK Debug Report:\n"\ "OS: {env}\n"\ "Python Version: {pyversion}\n"\ - "Version of the API: 2.1.4\n"\ + "Version of the API: 2.1.5\n"\ "SDK Package Version: 2.1.4.0".\ format(env=sys.platform, pyversion=sys.version) diff --git a/sdk/open_api/exceptions.py b/sdk/open_api/exceptions.py index 7bac308..4a685de 100644 --- a/sdk/open_api/exceptions.py +++ b/sdk/open_api/exceptions.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - The version of the OpenAPI document: 2.1.4 + The version of the OpenAPI document: 2.1.5 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/sdk/open_api/models/__init__.py b/sdk/open_api/models/__init__.py index b67ebec..6b3e0f2 100644 --- a/sdk/open_api/models/__init__.py +++ b/sdk/open_api/models/__init__.py @@ -6,7 +6,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - The version of the OpenAPI document: 2.1.4 + The version of the OpenAPI document: 2.1.5 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -50,6 +50,8 @@ from sdk.open_api.models.spot_execution import SpotExecution from sdk.open_api.models.spot_execution_list import SpotExecutionList from sdk.open_api.models.spot_market_definition import SpotMarketDefinition +from sdk.open_api.models.spot_trade_bust import SpotTradeBust +from sdk.open_api.models.spot_trade_bust_list import SpotTradeBustList from sdk.open_api.models.tier_type import TierType from sdk.open_api.models.time_in_force import TimeInForce from sdk.open_api.models.wallet_configuration import WalletConfiguration diff --git a/sdk/open_api/models/account.py b/sdk/open_api/models/account.py index 1f95485..fe986d0 100644 --- a/sdk/open_api/models/account.py +++ b/sdk/open_api/models/account.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - The version of the OpenAPI document: 2.1.4 + The version of the OpenAPI document: 2.1.5 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/sdk/open_api/models/account_balance.py b/sdk/open_api/models/account_balance.py index b23eb7e..40032b0 100644 --- a/sdk/open_api/models/account_balance.py +++ b/sdk/open_api/models/account_balance.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - The version of the OpenAPI document: 2.1.4 + The version of the OpenAPI document: 2.1.5 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/sdk/open_api/models/account_type.py b/sdk/open_api/models/account_type.py index 2bcefd5..d0bcca8 100644 --- a/sdk/open_api/models/account_type.py +++ b/sdk/open_api/models/account_type.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - The version of the OpenAPI document: 2.1.4 + The version of the OpenAPI document: 2.1.5 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/sdk/open_api/models/asset_definition.py b/sdk/open_api/models/asset_definition.py index 065df50..bfbab3d 100644 --- a/sdk/open_api/models/asset_definition.py +++ b/sdk/open_api/models/asset_definition.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - The version of the OpenAPI document: 2.1.4 + The version of the OpenAPI document: 2.1.5 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/sdk/open_api/models/cancel_order_request.py b/sdk/open_api/models/cancel_order_request.py index d678e3e..94ae507 100644 --- a/sdk/open_api/models/cancel_order_request.py +++ b/sdk/open_api/models/cancel_order_request.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - The version of the OpenAPI document: 2.1.4 + The version of the OpenAPI document: 2.1.5 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/sdk/open_api/models/cancel_order_response.py b/sdk/open_api/models/cancel_order_response.py index ae61a5c..fa0a699 100644 --- a/sdk/open_api/models/cancel_order_response.py +++ b/sdk/open_api/models/cancel_order_response.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - The version of the OpenAPI document: 2.1.4 + The version of the OpenAPI document: 2.1.5 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/sdk/open_api/models/candle_history_data.py b/sdk/open_api/models/candle_history_data.py index 542d3da..789b767 100644 --- a/sdk/open_api/models/candle_history_data.py +++ b/sdk/open_api/models/candle_history_data.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - The version of the OpenAPI document: 2.1.4 + The version of the OpenAPI document: 2.1.5 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/sdk/open_api/models/create_order_request.py b/sdk/open_api/models/create_order_request.py index 69c7c3d..2114756 100644 --- a/sdk/open_api/models/create_order_request.py +++ b/sdk/open_api/models/create_order_request.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - The version of the OpenAPI document: 2.1.4 + The version of the OpenAPI document: 2.1.5 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/sdk/open_api/models/create_order_response.py b/sdk/open_api/models/create_order_response.py index cae1170..410682f 100644 --- a/sdk/open_api/models/create_order_response.py +++ b/sdk/open_api/models/create_order_response.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - The version of the OpenAPI document: 2.1.4 + The version of the OpenAPI document: 2.1.5 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/sdk/open_api/models/depth.py b/sdk/open_api/models/depth.py index d952507..543609d 100644 --- a/sdk/open_api/models/depth.py +++ b/sdk/open_api/models/depth.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - The version of the OpenAPI document: 2.1.4 + The version of the OpenAPI document: 2.1.5 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/sdk/open_api/models/depth_type.py b/sdk/open_api/models/depth_type.py index bd49455..a41b738 100644 --- a/sdk/open_api/models/depth_type.py +++ b/sdk/open_api/models/depth_type.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - The version of the OpenAPI document: 2.1.4 + The version of the OpenAPI document: 2.1.5 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/sdk/open_api/models/execution_type.py b/sdk/open_api/models/execution_type.py index 376e088..a2c7641 100644 --- a/sdk/open_api/models/execution_type.py +++ b/sdk/open_api/models/execution_type.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - The version of the OpenAPI document: 2.1.4 + The version of the OpenAPI document: 2.1.5 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/sdk/open_api/models/fee_tier_parameters.py b/sdk/open_api/models/fee_tier_parameters.py index c7adb50..6488469 100644 --- a/sdk/open_api/models/fee_tier_parameters.py +++ b/sdk/open_api/models/fee_tier_parameters.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - The version of the OpenAPI document: 2.1.4 + The version of the OpenAPI document: 2.1.5 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/sdk/open_api/models/global_fee_parameters.py b/sdk/open_api/models/global_fee_parameters.py index 6b04528..58662e0 100644 --- a/sdk/open_api/models/global_fee_parameters.py +++ b/sdk/open_api/models/global_fee_parameters.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - The version of the OpenAPI document: 2.1.4 + The version of the OpenAPI document: 2.1.5 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/sdk/open_api/models/level.py b/sdk/open_api/models/level.py index 8b597ee..f27d457 100644 --- a/sdk/open_api/models/level.py +++ b/sdk/open_api/models/level.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - The version of the OpenAPI document: 2.1.4 + The version of the OpenAPI document: 2.1.5 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/sdk/open_api/models/liquidity_parameters.py b/sdk/open_api/models/liquidity_parameters.py index f801e80..ca3337d 100644 --- a/sdk/open_api/models/liquidity_parameters.py +++ b/sdk/open_api/models/liquidity_parameters.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - The version of the OpenAPI document: 2.1.4 + The version of the OpenAPI document: 2.1.5 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/sdk/open_api/models/market_definition.py b/sdk/open_api/models/market_definition.py index 4063459..03d19b1 100644 --- a/sdk/open_api/models/market_definition.py +++ b/sdk/open_api/models/market_definition.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - The version of the OpenAPI document: 2.1.4 + The version of the OpenAPI document: 2.1.5 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/sdk/open_api/models/market_summary.py b/sdk/open_api/models/market_summary.py index ba9578d..0fb0871 100644 --- a/sdk/open_api/models/market_summary.py +++ b/sdk/open_api/models/market_summary.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - The version of the OpenAPI document: 2.1.4 + The version of the OpenAPI document: 2.1.5 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/sdk/open_api/models/mass_cancel_request.py b/sdk/open_api/models/mass_cancel_request.py index c7ce9ff..acf0a4d 100644 --- a/sdk/open_api/models/mass_cancel_request.py +++ b/sdk/open_api/models/mass_cancel_request.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - The version of the OpenAPI document: 2.1.4 + The version of the OpenAPI document: 2.1.5 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/sdk/open_api/models/mass_cancel_response.py b/sdk/open_api/models/mass_cancel_response.py index 2627784..920202d 100644 --- a/sdk/open_api/models/mass_cancel_response.py +++ b/sdk/open_api/models/mass_cancel_response.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - The version of the OpenAPI document: 2.1.4 + The version of the OpenAPI document: 2.1.5 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/sdk/open_api/models/order.py b/sdk/open_api/models/order.py index 4ae4aa7..436f37a 100644 --- a/sdk/open_api/models/order.py +++ b/sdk/open_api/models/order.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - The version of the OpenAPI document: 2.1.4 + The version of the OpenAPI document: 2.1.5 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/sdk/open_api/models/order_status.py b/sdk/open_api/models/order_status.py index b420c6b..3d5c49c 100644 --- a/sdk/open_api/models/order_status.py +++ b/sdk/open_api/models/order_status.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - The version of the OpenAPI document: 2.1.4 + The version of the OpenAPI document: 2.1.5 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/sdk/open_api/models/order_type.py b/sdk/open_api/models/order_type.py index 036f4e4..5bb06ef 100644 --- a/sdk/open_api/models/order_type.py +++ b/sdk/open_api/models/order_type.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - The version of the OpenAPI document: 2.1.4 + The version of the OpenAPI document: 2.1.5 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/sdk/open_api/models/pagination_meta.py b/sdk/open_api/models/pagination_meta.py index 308c26b..448fddd 100644 --- a/sdk/open_api/models/pagination_meta.py +++ b/sdk/open_api/models/pagination_meta.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - The version of the OpenAPI document: 2.1.4 + The version of the OpenAPI document: 2.1.5 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/sdk/open_api/models/perp_execution.py b/sdk/open_api/models/perp_execution.py index 52f5a59..8f81508 100644 --- a/sdk/open_api/models/perp_execution.py +++ b/sdk/open_api/models/perp_execution.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - The version of the OpenAPI document: 2.1.4 + The version of the OpenAPI document: 2.1.5 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/sdk/open_api/models/perp_execution_list.py b/sdk/open_api/models/perp_execution_list.py index 2472acf..bfb8715 100644 --- a/sdk/open_api/models/perp_execution_list.py +++ b/sdk/open_api/models/perp_execution_list.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - The version of the OpenAPI document: 2.1.4 + The version of the OpenAPI document: 2.1.5 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/sdk/open_api/models/position.py b/sdk/open_api/models/position.py index 27c1d8d..69d966d 100644 --- a/sdk/open_api/models/position.py +++ b/sdk/open_api/models/position.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - The version of the OpenAPI document: 2.1.4 + The version of the OpenAPI document: 2.1.5 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/sdk/open_api/models/price.py b/sdk/open_api/models/price.py index c627404..de93fdf 100644 --- a/sdk/open_api/models/price.py +++ b/sdk/open_api/models/price.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - The version of the OpenAPI document: 2.1.4 + The version of the OpenAPI document: 2.1.5 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/sdk/open_api/models/request_error.py b/sdk/open_api/models/request_error.py index 2ae152b..0498dc5 100644 --- a/sdk/open_api/models/request_error.py +++ b/sdk/open_api/models/request_error.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - The version of the OpenAPI document: 2.1.4 + The version of the OpenAPI document: 2.1.5 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/sdk/open_api/models/request_error_code.py b/sdk/open_api/models/request_error_code.py index a6ef66b..40666fd 100644 --- a/sdk/open_api/models/request_error_code.py +++ b/sdk/open_api/models/request_error_code.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - The version of the OpenAPI document: 2.1.4 + The version of the OpenAPI document: 2.1.5 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/sdk/open_api/models/server_error.py b/sdk/open_api/models/server_error.py index 09516b7..4aaec04 100644 --- a/sdk/open_api/models/server_error.py +++ b/sdk/open_api/models/server_error.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - The version of the OpenAPI document: 2.1.4 + The version of the OpenAPI document: 2.1.5 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/sdk/open_api/models/server_error_code.py b/sdk/open_api/models/server_error_code.py index dc693c1..6450fa3 100644 --- a/sdk/open_api/models/server_error_code.py +++ b/sdk/open_api/models/server_error_code.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - The version of the OpenAPI document: 2.1.4 + The version of the OpenAPI document: 2.1.5 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/sdk/open_api/models/side.py b/sdk/open_api/models/side.py index 98a47de..513f255 100644 --- a/sdk/open_api/models/side.py +++ b/sdk/open_api/models/side.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - The version of the OpenAPI document: 2.1.4 + The version of the OpenAPI document: 2.1.5 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/sdk/open_api/models/spot_execution.py b/sdk/open_api/models/spot_execution.py index 21db264..a2a88eb 100644 --- a/sdk/open_api/models/spot_execution.py +++ b/sdk/open_api/models/spot_execution.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - The version of the OpenAPI document: 2.1.4 + The version of the OpenAPI document: 2.1.5 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/sdk/open_api/models/spot_execution_list.py b/sdk/open_api/models/spot_execution_list.py index b1195e7..d10cfdc 100644 --- a/sdk/open_api/models/spot_execution_list.py +++ b/sdk/open_api/models/spot_execution_list.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - The version of the OpenAPI document: 2.1.4 + The version of the OpenAPI document: 2.1.5 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/sdk/open_api/models/spot_market_definition.py b/sdk/open_api/models/spot_market_definition.py index 63cf2c2..e01fe83 100644 --- a/sdk/open_api/models/spot_market_definition.py +++ b/sdk/open_api/models/spot_market_definition.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - The version of the OpenAPI document: 2.1.4 + The version of the OpenAPI document: 2.1.5 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/sdk/open_api/models/spot_trade_bust.py b/sdk/open_api/models/spot_trade_bust.py new file mode 100644 index 0000000..258d1b1 --- /dev/null +++ b/sdk/open_api/models/spot_trade_bust.py @@ -0,0 +1,139 @@ +# coding: utf-8 + +""" + Reya DEX Trading API v2 + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.1.5 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from sdk.open_api.models.side import Side +from typing import Optional, Set +from typing_extensions import Self + +class SpotTradeBust(BaseModel): + """ + SpotTradeBust + """ # noqa: E501 + symbol: Annotated[str, Field(strict=True)] = Field(description="Trading symbol (e.g., BTCRUSDPERP, WETHRUSD)") + account_id: Annotated[int, Field(strict=True, ge=0)] = Field(alias="accountId") + counterparty_account_id: Annotated[int, Field(strict=True, ge=0)] = Field(alias="counterpartyAccountId") + qty: Annotated[str, Field(strict=True)] + side: Side + price: Annotated[str, Field(strict=True)] + reason: StrictStr = Field(description="Hex-encoded revert reason bytes") + timestamp: Annotated[int, Field(strict=True, ge=0)] + transaction_hash: StrictStr = Field(description="Transaction hash", alias="transactionHash") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["symbol", "accountId", "counterpartyAccountId", "qty", "side", "price", "reason", "timestamp", "transactionHash"] + + @field_validator('symbol') + def symbol_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^[A-Za-z0-9]+$", value): + raise ValueError(r"must validate the regular expression /^[A-Za-z0-9]+$/") + return value + + @field_validator('qty') + def qty_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^\d+(\.\d+)?([eE][+-]?\d+)?$", value): + raise ValueError(r"must validate the regular expression /^\d+(\.\d+)?([eE][+-]?\d+)?$/") + return value + + @field_validator('price') + def price_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^-?\d+(\.\d+)?([eE][+-]?\d+)?$", value): + raise ValueError(r"must validate the regular expression /^-?\d+(\.\d+)?([eE][+-]?\d+)?$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SpotTradeBust from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SpotTradeBust from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "symbol": obj.get("symbol"), + "accountId": obj.get("accountId"), + "counterpartyAccountId": obj.get("counterpartyAccountId"), + "qty": obj.get("qty"), + "side": obj.get("side"), + "price": obj.get("price"), + "reason": obj.get("reason"), + "timestamp": obj.get("timestamp"), + "transactionHash": obj.get("transactionHash") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/sdk/open_api/models/spot_trade_bust_list.py b/sdk/open_api/models/spot_trade_bust_list.py new file mode 100644 index 0000000..e04b0c0 --- /dev/null +++ b/sdk/open_api/models/spot_trade_bust_list.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + Reya DEX Trading API v2 + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.1.5 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from sdk.open_api.models.pagination_meta import PaginationMeta +from sdk.open_api.models.spot_trade_bust import SpotTradeBust +from typing import Optional, Set +from typing_extensions import Self + +class SpotTradeBustList(BaseModel): + """ + SpotTradeBustList + """ # noqa: E501 + data: List[SpotTradeBust] + meta: PaginationMeta + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["data", "meta"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SpotTradeBustList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SpotTradeBustList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [SpotTradeBust.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "meta": PaginationMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/sdk/open_api/models/tier_type.py b/sdk/open_api/models/tier_type.py index 808df02..902c974 100644 --- a/sdk/open_api/models/tier_type.py +++ b/sdk/open_api/models/tier_type.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - The version of the OpenAPI document: 2.1.4 + The version of the OpenAPI document: 2.1.5 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/sdk/open_api/models/time_in_force.py b/sdk/open_api/models/time_in_force.py index 2fbffb6..ac31971 100644 --- a/sdk/open_api/models/time_in_force.py +++ b/sdk/open_api/models/time_in_force.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - The version of the OpenAPI document: 2.1.4 + The version of the OpenAPI document: 2.1.5 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/sdk/open_api/models/wallet_configuration.py b/sdk/open_api/models/wallet_configuration.py index fa0aa3f..25cb14a 100644 --- a/sdk/open_api/models/wallet_configuration.py +++ b/sdk/open_api/models/wallet_configuration.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - The version of the OpenAPI document: 2.1.4 + The version of the OpenAPI document: 2.1.5 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/sdk/open_api/rest.py b/sdk/open_api/rest.py index 744b2bb..5f51557 100644 --- a/sdk/open_api/rest.py +++ b/sdk/open_api/rest.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - The version of the OpenAPI document: 2.1.4 + The version of the OpenAPI document: 2.1.5 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/sdk/reya_rest_api/client.py b/sdk/reya_rest_api/client.py index ebe3a31..5dde58c 100644 --- a/sdk/reya_rest_api/client.py +++ b/sdk/reya_rest_api/client.py @@ -32,6 +32,7 @@ from sdk.open_api.models.perp_execution_list import PerpExecutionList from sdk.open_api.models.position import Position from sdk.open_api.models.spot_execution_list import SpotExecutionList +from sdk.open_api.models.spot_trade_bust_list import SpotTradeBustList from sdk.open_api.models.time_in_force import TimeInForce from sdk.open_api.models.wallet_configuration import WalletConfiguration from sdk.reya_rest_api.auth.signatures import SignatureGenerator @@ -704,6 +705,22 @@ async def get_spot_executions(self) -> SpotExecutionList: return await self.wallet.get_wallet_spot_executions(address=wallet) + async def get_spot_trade_busts(self) -> SpotTradeBustList: + """ + Get spot trade busts (failed spot fills) for the owner wallet asynchronously. + + Returns: + Spot trade busts + + Raises: + ValueError: If no wallet address is available or API returns an error + """ + wallet = self.owner_wallet_address + if not wallet: + raise ValueError("No wallet address available. Private key must be provided.") + + return await self.wallet.get_wallet_spot_trade_busts(address=wallet) + async def close(self) -> None: """ Close the underlying HTTP client session.