crypticorn 2.11.6__py3-none-any.whl → 2.11.8__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. crypticorn/common/errors.py +14 -3
  2. crypticorn/trade/client/__init__.py +27 -9
  3. crypticorn/trade/client/api/__init__.py +1 -0
  4. crypticorn/trade/client/api/admin_api.py +1455 -0
  5. crypticorn/trade/client/api/api_keys_api.py +60 -58
  6. crypticorn/trade/client/api/bots_api.py +289 -48
  7. crypticorn/trade/client/api/exchanges_api.py +474 -17
  8. crypticorn/trade/client/api/futures_trading_panel_api.py +1 -1
  9. crypticorn/trade/client/api/notifications_api.py +80 -96
  10. crypticorn/trade/client/api/orders_api.py +7 -7
  11. crypticorn/trade/client/api/status_api.py +5 -232
  12. crypticorn/trade/client/api/strategies_api.py +55 -54
  13. crypticorn/trade/client/api/trading_actions_api.py +42 -38
  14. crypticorn/trade/client/api_client.py +1 -1
  15. crypticorn/trade/client/configuration.py +1 -1
  16. crypticorn/trade/client/exceptions.py +1 -1
  17. crypticorn/trade/client/models/__init__.py +26 -9
  18. crypticorn/trade/client/models/api_error_identifier.py +116 -0
  19. crypticorn/trade/client/models/api_error_level.py +37 -0
  20. crypticorn/trade/client/models/api_error_type.py +37 -0
  21. crypticorn/trade/client/models/{bot_model.py → bot.py} +59 -60
  22. crypticorn/trade/client/models/bot_create.py +104 -0
  23. crypticorn/trade/client/models/bot_status.py +1 -1
  24. crypticorn/trade/client/models/bot_update.py +107 -0
  25. crypticorn/trade/client/models/exception_detail.py +8 -5
  26. crypticorn/trade/client/models/exchange.py +36 -0
  27. crypticorn/trade/client/models/exchange_key.py +111 -0
  28. crypticorn/trade/client/models/exchange_key_create.py +107 -0
  29. crypticorn/trade/client/models/{exchange_key_model.py → exchange_key_update.py} +12 -47
  30. crypticorn/trade/client/models/execution_ids.py +1 -1
  31. crypticorn/trade/client/models/futures_balance.py +1 -1
  32. crypticorn/trade/client/models/futures_trading_action.py +24 -16
  33. crypticorn/trade/client/models/{spot_trading_action.py → futures_trading_action_create.py} +24 -28
  34. crypticorn/trade/client/models/log_level.py +38 -0
  35. crypticorn/trade/client/models/margin_mode.py +1 -1
  36. crypticorn/trade/client/models/market_type.py +35 -0
  37. crypticorn/trade/client/models/{notification_model.py → notification.py} +35 -40
  38. crypticorn/trade/client/models/notification_create.py +114 -0
  39. crypticorn/trade/client/models/notification_update.py +96 -0
  40. crypticorn/trade/client/models/{order_model.py → order.py} +66 -59
  41. crypticorn/trade/client/models/order_status.py +1 -1
  42. crypticorn/trade/client/models/post_futures_action.py +1 -1
  43. crypticorn/trade/client/models/{action_model.py → spot_trading_action_create.py} +7 -65
  44. crypticorn/trade/client/models/{strategy_model_input.py → strategy.py} +32 -31
  45. crypticorn/trade/client/models/{strategy_model_output.py → strategy_create.py} +22 -36
  46. crypticorn/trade/client/models/strategy_exchange_info.py +4 -3
  47. crypticorn/trade/client/models/strategy_update.py +147 -0
  48. crypticorn/trade/client/models/tpsl.py +1 -1
  49. crypticorn/trade/client/models/trading_action_type.py +1 -1
  50. crypticorn/trade/client/rest.py +1 -1
  51. {crypticorn-2.11.6.dist-info → crypticorn-2.11.8.dist-info}/METADATA +1 -1
  52. {crypticorn-2.11.6.dist-info → crypticorn-2.11.8.dist-info}/RECORD +56 -42
  53. {crypticorn-2.11.6.dist-info → crypticorn-2.11.8.dist-info}/WHEEL +0 -0
  54. {crypticorn-2.11.6.dist-info → crypticorn-2.11.8.dist-info}/entry_points.txt +0 -0
  55. {crypticorn-2.11.6.dist-info → crypticorn-2.11.8.dist-info}/licenses/LICENSE +0 -0
  56. {crypticorn-2.11.6.dist-info → crypticorn-2.11.8.dist-info}/top_level.txt +0 -0
@@ -3,7 +3,7 @@
3
3
  """
4
4
  Trading API
5
5
 
6
- API for automated trading and exchange interface
6
+ API for automated trading and exchange interface. This API is used to trade on the exchange and manage bots, API keys, orders, and more.
7
7
 
8
8
  The version of the OpenAPI document: 1.0.0
9
9
  Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -17,8 +17,10 @@ from typing import Any, Dict, List, Optional, Tuple, Union
17
17
  from typing_extensions import Annotated
18
18
 
19
19
  from pydantic import StrictInt, StrictStr
20
- from typing import Any, List, Optional
21
- from crypticorn.trade.client.models.exchange_key_model import ExchangeKeyModel
20
+ from typing import List, Optional
21
+ from crypticorn.trade.client.models.exchange_key import ExchangeKey
22
+ from crypticorn.trade.client.models.exchange_key_create import ExchangeKeyCreate
23
+ from crypticorn.trade.client.models.exchange_key_update import ExchangeKeyUpdate
22
24
 
23
25
  from crypticorn.trade.client.api_client import ApiClient, RequestSerialized
24
26
  from crypticorn.trade.client.api_response import ApiResponse
@@ -40,7 +42,7 @@ class APIKeysApi:
40
42
  @validate_call
41
43
  async def create_exchange_key(
42
44
  self,
43
- exchange_key_model: ExchangeKeyModel,
45
+ exchange_key_create: ExchangeKeyCreate,
44
46
  _request_timeout: Union[
45
47
  None,
46
48
  Annotated[StrictFloat, Field(gt=0)],
@@ -52,12 +54,12 @@ class APIKeysApi:
52
54
  _content_type: Optional[StrictStr] = None,
53
55
  _headers: Optional[Dict[StrictStr, Any]] = None,
54
56
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
55
- ) -> object:
57
+ ) -> ExchangeKey:
56
58
  """Post Exchange Key
57
59
 
58
60
 
59
- :param exchange_key_model: (required)
60
- :type exchange_key_model: ExchangeKeyModel
61
+ :param exchange_key_create: (required)
62
+ :type exchange_key_create: ExchangeKeyCreate
61
63
  :param _request_timeout: timeout setting for this request. If one
62
64
  number provided, it will be total request
63
65
  timeout. It can also be a pair (tuple) of
@@ -81,7 +83,7 @@ class APIKeysApi:
81
83
  """ # noqa: E501
82
84
 
83
85
  _param = self._create_exchange_key_serialize(
84
- exchange_key_model=exchange_key_model,
86
+ exchange_key_create=exchange_key_create,
85
87
  _request_auth=_request_auth,
86
88
  _content_type=_content_type,
87
89
  _headers=_headers,
@@ -89,7 +91,7 @@ class APIKeysApi:
89
91
  )
90
92
 
91
93
  _response_types_map: Dict[str, Optional[str]] = {
92
- "201": "object",
94
+ "201": "ExchangeKey",
93
95
  }
94
96
  response_data = await self.api_client.call_api(
95
97
  *_param, _request_timeout=_request_timeout
@@ -103,7 +105,7 @@ class APIKeysApi:
103
105
  @validate_call
104
106
  async def create_exchange_key_with_http_info(
105
107
  self,
106
- exchange_key_model: ExchangeKeyModel,
108
+ exchange_key_create: ExchangeKeyCreate,
107
109
  _request_timeout: Union[
108
110
  None,
109
111
  Annotated[StrictFloat, Field(gt=0)],
@@ -115,12 +117,12 @@ class APIKeysApi:
115
117
  _content_type: Optional[StrictStr] = None,
116
118
  _headers: Optional[Dict[StrictStr, Any]] = None,
117
119
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
118
- ) -> ApiResponse[object]:
120
+ ) -> ApiResponse[ExchangeKey]:
119
121
  """Post Exchange Key
120
122
 
121
123
 
122
- :param exchange_key_model: (required)
123
- :type exchange_key_model: ExchangeKeyModel
124
+ :param exchange_key_create: (required)
125
+ :type exchange_key_create: ExchangeKeyCreate
124
126
  :param _request_timeout: timeout setting for this request. If one
125
127
  number provided, it will be total request
126
128
  timeout. It can also be a pair (tuple) of
@@ -144,7 +146,7 @@ class APIKeysApi:
144
146
  """ # noqa: E501
145
147
 
146
148
  _param = self._create_exchange_key_serialize(
147
- exchange_key_model=exchange_key_model,
149
+ exchange_key_create=exchange_key_create,
148
150
  _request_auth=_request_auth,
149
151
  _content_type=_content_type,
150
152
  _headers=_headers,
@@ -152,7 +154,7 @@ class APIKeysApi:
152
154
  )
153
155
 
154
156
  _response_types_map: Dict[str, Optional[str]] = {
155
- "201": "object",
157
+ "201": "ExchangeKey",
156
158
  }
157
159
  response_data = await self.api_client.call_api(
158
160
  *_param, _request_timeout=_request_timeout
@@ -166,7 +168,7 @@ class APIKeysApi:
166
168
  @validate_call
167
169
  async def create_exchange_key_without_preload_content(
168
170
  self,
169
- exchange_key_model: ExchangeKeyModel,
171
+ exchange_key_create: ExchangeKeyCreate,
170
172
  _request_timeout: Union[
171
173
  None,
172
174
  Annotated[StrictFloat, Field(gt=0)],
@@ -182,8 +184,8 @@ class APIKeysApi:
182
184
  """Post Exchange Key
183
185
 
184
186
 
185
- :param exchange_key_model: (required)
186
- :type exchange_key_model: ExchangeKeyModel
187
+ :param exchange_key_create: (required)
188
+ :type exchange_key_create: ExchangeKeyCreate
187
189
  :param _request_timeout: timeout setting for this request. If one
188
190
  number provided, it will be total request
189
191
  timeout. It can also be a pair (tuple) of
@@ -207,7 +209,7 @@ class APIKeysApi:
207
209
  """ # noqa: E501
208
210
 
209
211
  _param = self._create_exchange_key_serialize(
210
- exchange_key_model=exchange_key_model,
212
+ exchange_key_create=exchange_key_create,
211
213
  _request_auth=_request_auth,
212
214
  _content_type=_content_type,
213
215
  _headers=_headers,
@@ -215,7 +217,7 @@ class APIKeysApi:
215
217
  )
216
218
 
217
219
  _response_types_map: Dict[str, Optional[str]] = {
218
- "201": "object",
220
+ "201": "ExchangeKey",
219
221
  }
220
222
  response_data = await self.api_client.call_api(
221
223
  *_param, _request_timeout=_request_timeout
@@ -224,7 +226,7 @@ class APIKeysApi:
224
226
 
225
227
  def _create_exchange_key_serialize(
226
228
  self,
227
- exchange_key_model,
229
+ exchange_key_create,
228
230
  _request_auth,
229
231
  _content_type,
230
232
  _headers,
@@ -249,8 +251,8 @@ class APIKeysApi:
249
251
  # process the header parameters
250
252
  # process the form parameters
251
253
  # process the body parameter
252
- if exchange_key_model is not None:
253
- _body_params = exchange_key_model
254
+ if exchange_key_create is not None:
255
+ _body_params = exchange_key_create
254
256
 
255
257
  # set the HTTP header `Accept`
256
258
  if "Accept" not in _header_params:
@@ -301,7 +303,7 @@ class APIKeysApi:
301
303
  _content_type: Optional[StrictStr] = None,
302
304
  _headers: Optional[Dict[StrictStr, Any]] = None,
303
305
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
304
- ) -> object:
306
+ ) -> None:
305
307
  """Delete Exchange Key
306
308
 
307
309
 
@@ -338,7 +340,7 @@ class APIKeysApi:
338
340
  )
339
341
 
340
342
  _response_types_map: Dict[str, Optional[str]] = {
341
- "200": "object",
343
+ "204": None,
342
344
  }
343
345
  response_data = await self.api_client.call_api(
344
346
  *_param, _request_timeout=_request_timeout
@@ -364,7 +366,7 @@ class APIKeysApi:
364
366
  _content_type: Optional[StrictStr] = None,
365
367
  _headers: Optional[Dict[StrictStr, Any]] = None,
366
368
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
367
- ) -> ApiResponse[object]:
369
+ ) -> ApiResponse[None]:
368
370
  """Delete Exchange Key
369
371
 
370
372
 
@@ -401,7 +403,7 @@ class APIKeysApi:
401
403
  )
402
404
 
403
405
  _response_types_map: Dict[str, Optional[str]] = {
404
- "200": "object",
406
+ "204": None,
405
407
  }
406
408
  response_data = await self.api_client.call_api(
407
409
  *_param, _request_timeout=_request_timeout
@@ -464,7 +466,7 @@ class APIKeysApi:
464
466
  )
465
467
 
466
468
  _response_types_map: Dict[str, Optional[str]] = {
467
- "200": "object",
469
+ "204": None,
468
470
  }
469
471
  response_data = await self.api_client.call_api(
470
472
  *_param, _request_timeout=_request_timeout
@@ -540,7 +542,7 @@ class APIKeysApi:
540
542
  _content_type: Optional[StrictStr] = None,
541
543
  _headers: Optional[Dict[StrictStr, Any]] = None,
542
544
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
543
- ) -> ExchangeKeyModel:
545
+ ) -> ExchangeKey:
544
546
  """Get Exchange Key By Id
545
547
 
546
548
 
@@ -577,7 +579,7 @@ class APIKeysApi:
577
579
  )
578
580
 
579
581
  _response_types_map: Dict[str, Optional[str]] = {
580
- "200": "ExchangeKeyModel",
582
+ "200": "ExchangeKey",
581
583
  }
582
584
  response_data = await self.api_client.call_api(
583
585
  *_param, _request_timeout=_request_timeout
@@ -603,7 +605,7 @@ class APIKeysApi:
603
605
  _content_type: Optional[StrictStr] = None,
604
606
  _headers: Optional[Dict[StrictStr, Any]] = None,
605
607
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
606
- ) -> ApiResponse[ExchangeKeyModel]:
608
+ ) -> ApiResponse[ExchangeKey]:
607
609
  """Get Exchange Key By Id
608
610
 
609
611
 
@@ -640,7 +642,7 @@ class APIKeysApi:
640
642
  )
641
643
 
642
644
  _response_types_map: Dict[str, Optional[str]] = {
643
- "200": "ExchangeKeyModel",
645
+ "200": "ExchangeKey",
644
646
  }
645
647
  response_data = await self.api_client.call_api(
646
648
  *_param, _request_timeout=_request_timeout
@@ -703,7 +705,7 @@ class APIKeysApi:
703
705
  )
704
706
 
705
707
  _response_types_map: Dict[str, Optional[str]] = {
706
- "200": "ExchangeKeyModel",
708
+ "200": "ExchangeKey",
707
709
  }
708
710
  response_data = await self.api_client.call_api(
709
711
  *_param, _request_timeout=_request_timeout
@@ -780,7 +782,7 @@ class APIKeysApi:
780
782
  _content_type: Optional[StrictStr] = None,
781
783
  _headers: Optional[Dict[StrictStr, Any]] = None,
782
784
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
783
- ) -> List[ExchangeKeyModel]:
785
+ ) -> List[ExchangeKey]:
784
786
  """Get Exchange Keys
785
787
 
786
788
 
@@ -820,7 +822,7 @@ class APIKeysApi:
820
822
  )
821
823
 
822
824
  _response_types_map: Dict[str, Optional[str]] = {
823
- "200": "List[ExchangeKeyModel]",
825
+ "200": "List[ExchangeKey]",
824
826
  }
825
827
  response_data = await self.api_client.call_api(
826
828
  *_param, _request_timeout=_request_timeout
@@ -847,7 +849,7 @@ class APIKeysApi:
847
849
  _content_type: Optional[StrictStr] = None,
848
850
  _headers: Optional[Dict[StrictStr, Any]] = None,
849
851
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
850
- ) -> ApiResponse[List[ExchangeKeyModel]]:
852
+ ) -> ApiResponse[List[ExchangeKey]]:
851
853
  """Get Exchange Keys
852
854
 
853
855
 
@@ -887,7 +889,7 @@ class APIKeysApi:
887
889
  )
888
890
 
889
891
  _response_types_map: Dict[str, Optional[str]] = {
890
- "200": "List[ExchangeKeyModel]",
892
+ "200": "List[ExchangeKey]",
891
893
  }
892
894
  response_data = await self.api_client.call_api(
893
895
  *_param, _request_timeout=_request_timeout
@@ -954,7 +956,7 @@ class APIKeysApi:
954
956
  )
955
957
 
956
958
  _response_types_map: Dict[str, Optional[str]] = {
957
- "200": "List[ExchangeKeyModel]",
959
+ "200": "List[ExchangeKey]",
958
960
  }
959
961
  response_data = await self.api_client.call_api(
960
962
  *_param, _request_timeout=_request_timeout
@@ -1026,7 +1028,7 @@ class APIKeysApi:
1026
1028
  async def update_exchange_key(
1027
1029
  self,
1028
1030
  id: StrictStr,
1029
- exchange_key_model: ExchangeKeyModel,
1031
+ exchange_key_update: ExchangeKeyUpdate,
1030
1032
  _request_timeout: Union[
1031
1033
  None,
1032
1034
  Annotated[StrictFloat, Field(gt=0)],
@@ -1038,14 +1040,14 @@ class APIKeysApi:
1038
1040
  _content_type: Optional[StrictStr] = None,
1039
1041
  _headers: Optional[Dict[StrictStr, Any]] = None,
1040
1042
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1041
- ) -> object:
1043
+ ) -> ExchangeKey:
1042
1044
  """Put Exchange Key
1043
1045
 
1044
1046
 
1045
1047
  :param id: (required)
1046
1048
  :type id: str
1047
- :param exchange_key_model: (required)
1048
- :type exchange_key_model: ExchangeKeyModel
1049
+ :param exchange_key_update: (required)
1050
+ :type exchange_key_update: ExchangeKeyUpdate
1049
1051
  :param _request_timeout: timeout setting for this request. If one
1050
1052
  number provided, it will be total request
1051
1053
  timeout. It can also be a pair (tuple) of
@@ -1070,7 +1072,7 @@ class APIKeysApi:
1070
1072
 
1071
1073
  _param = self._update_exchange_key_serialize(
1072
1074
  id=id,
1073
- exchange_key_model=exchange_key_model,
1075
+ exchange_key_update=exchange_key_update,
1074
1076
  _request_auth=_request_auth,
1075
1077
  _content_type=_content_type,
1076
1078
  _headers=_headers,
@@ -1078,7 +1080,7 @@ class APIKeysApi:
1078
1080
  )
1079
1081
 
1080
1082
  _response_types_map: Dict[str, Optional[str]] = {
1081
- "200": "object",
1083
+ "200": "ExchangeKey",
1082
1084
  }
1083
1085
  response_data = await self.api_client.call_api(
1084
1086
  *_param, _request_timeout=_request_timeout
@@ -1093,7 +1095,7 @@ class APIKeysApi:
1093
1095
  async def update_exchange_key_with_http_info(
1094
1096
  self,
1095
1097
  id: StrictStr,
1096
- exchange_key_model: ExchangeKeyModel,
1098
+ exchange_key_update: ExchangeKeyUpdate,
1097
1099
  _request_timeout: Union[
1098
1100
  None,
1099
1101
  Annotated[StrictFloat, Field(gt=0)],
@@ -1105,14 +1107,14 @@ class APIKeysApi:
1105
1107
  _content_type: Optional[StrictStr] = None,
1106
1108
  _headers: Optional[Dict[StrictStr, Any]] = None,
1107
1109
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1108
- ) -> ApiResponse[object]:
1110
+ ) -> ApiResponse[ExchangeKey]:
1109
1111
  """Put Exchange Key
1110
1112
 
1111
1113
 
1112
1114
  :param id: (required)
1113
1115
  :type id: str
1114
- :param exchange_key_model: (required)
1115
- :type exchange_key_model: ExchangeKeyModel
1116
+ :param exchange_key_update: (required)
1117
+ :type exchange_key_update: ExchangeKeyUpdate
1116
1118
  :param _request_timeout: timeout setting for this request. If one
1117
1119
  number provided, it will be total request
1118
1120
  timeout. It can also be a pair (tuple) of
@@ -1137,7 +1139,7 @@ class APIKeysApi:
1137
1139
 
1138
1140
  _param = self._update_exchange_key_serialize(
1139
1141
  id=id,
1140
- exchange_key_model=exchange_key_model,
1142
+ exchange_key_update=exchange_key_update,
1141
1143
  _request_auth=_request_auth,
1142
1144
  _content_type=_content_type,
1143
1145
  _headers=_headers,
@@ -1145,7 +1147,7 @@ class APIKeysApi:
1145
1147
  )
1146
1148
 
1147
1149
  _response_types_map: Dict[str, Optional[str]] = {
1148
- "200": "object",
1150
+ "200": "ExchangeKey",
1149
1151
  }
1150
1152
  response_data = await self.api_client.call_api(
1151
1153
  *_param, _request_timeout=_request_timeout
@@ -1160,7 +1162,7 @@ class APIKeysApi:
1160
1162
  async def update_exchange_key_without_preload_content(
1161
1163
  self,
1162
1164
  id: StrictStr,
1163
- exchange_key_model: ExchangeKeyModel,
1165
+ exchange_key_update: ExchangeKeyUpdate,
1164
1166
  _request_timeout: Union[
1165
1167
  None,
1166
1168
  Annotated[StrictFloat, Field(gt=0)],
@@ -1178,8 +1180,8 @@ class APIKeysApi:
1178
1180
 
1179
1181
  :param id: (required)
1180
1182
  :type id: str
1181
- :param exchange_key_model: (required)
1182
- :type exchange_key_model: ExchangeKeyModel
1183
+ :param exchange_key_update: (required)
1184
+ :type exchange_key_update: ExchangeKeyUpdate
1183
1185
  :param _request_timeout: timeout setting for this request. If one
1184
1186
  number provided, it will be total request
1185
1187
  timeout. It can also be a pair (tuple) of
@@ -1204,7 +1206,7 @@ class APIKeysApi:
1204
1206
 
1205
1207
  _param = self._update_exchange_key_serialize(
1206
1208
  id=id,
1207
- exchange_key_model=exchange_key_model,
1209
+ exchange_key_update=exchange_key_update,
1208
1210
  _request_auth=_request_auth,
1209
1211
  _content_type=_content_type,
1210
1212
  _headers=_headers,
@@ -1212,7 +1214,7 @@ class APIKeysApi:
1212
1214
  )
1213
1215
 
1214
1216
  _response_types_map: Dict[str, Optional[str]] = {
1215
- "200": "object",
1217
+ "200": "ExchangeKey",
1216
1218
  }
1217
1219
  response_data = await self.api_client.call_api(
1218
1220
  *_param, _request_timeout=_request_timeout
@@ -1222,7 +1224,7 @@ class APIKeysApi:
1222
1224
  def _update_exchange_key_serialize(
1223
1225
  self,
1224
1226
  id,
1225
- exchange_key_model,
1227
+ exchange_key_update,
1226
1228
  _request_auth,
1227
1229
  _content_type,
1228
1230
  _headers,
@@ -1249,8 +1251,8 @@ class APIKeysApi:
1249
1251
  # process the header parameters
1250
1252
  # process the form parameters
1251
1253
  # process the body parameter
1252
- if exchange_key_model is not None:
1253
- _body_params = exchange_key_model
1254
+ if exchange_key_update is not None:
1255
+ _body_params = exchange_key_update
1254
1256
 
1255
1257
  # set the HTTP header `Accept`
1256
1258
  if "Accept" not in _header_params: