crypticorn 2.17.0rc5__py3-none-any.whl → 2.17.0rc6__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.
- crypticorn/auth/client/api/admin_api.py +6 -24
- crypticorn/auth/client/api/auth_api.py +36 -144
- crypticorn/auth/client/api/service_api.py +3 -12
- crypticorn/auth/client/api/user_api.py +33 -132
- crypticorn/auth/client/api/wallet_api.py +18 -72
- crypticorn/cli/templates/Dockerfile +5 -2
- crypticorn/common/auth.py +30 -0
- crypticorn/common/errors.py +10 -0
- crypticorn/common/pagination.py +1 -1
- crypticorn/common/router/admin_router.py +1 -11
- crypticorn/common/router/status_router.py +33 -2
- crypticorn/common/scopes.py +2 -2
- crypticorn/dex/client/api/admin_api.py +21 -84
- crypticorn/dex/client/api/signals_api.py +9 -36
- crypticorn/dex/client/api/status_api.py +6 -24
- crypticorn/hive/client/api/admin_api.py +18 -72
- crypticorn/hive/client/api/data_api.py +6 -24
- crypticorn/hive/client/api/models_api.py +21 -84
- crypticorn/hive/client/api/status_api.py +6 -24
- crypticorn/klines/client/api/admin_api.py +18 -72
- crypticorn/klines/client/api/change_in_timeframe_api.py +3 -12
- crypticorn/klines/client/api/funding_rates_api.py +3 -12
- crypticorn/klines/client/api/ohlcv_data_api.py +3 -12
- crypticorn/klines/client/api/status_api.py +6 -24
- crypticorn/klines/client/api/symbols_api.py +3 -12
- crypticorn/klines/client/api/udf_api.py +18 -72
- crypticorn/metrics/client/api/admin_api.py +18 -72
- crypticorn/metrics/client/api/exchanges_api.py +12 -48
- crypticorn/metrics/client/api/indicators_api.py +6 -24
- crypticorn/metrics/client/api/logs_api.py +3 -12
- crypticorn/metrics/client/api/marketcap_api.py +12 -48
- crypticorn/metrics/client/api/markets_api.py +3 -12
- crypticorn/metrics/client/api/quote_currencies_api.py +3 -12
- crypticorn/metrics/client/api/status_api.py +6 -24
- crypticorn/metrics/client/api/tokens_api.py +6 -24
- crypticorn/pay/client/api/admin_api.py +21 -84
- crypticorn/pay/client/api/now_payments_api.py +15 -60
- crypticorn/pay/client/api/payments_api.py +6 -24
- crypticorn/pay/client/api/products_api.py +12 -48
- crypticorn/pay/client/api/status_api.py +6 -24
- crypticorn/trade/client/__init__.py +10 -0
- crypticorn/trade/client/api/admin_api.py +21 -84
- crypticorn/trade/client/api/api_keys_api.py +207 -184
- crypticorn/trade/client/api/bots_api.py +2435 -662
- crypticorn/trade/client/api/exchanges_api.py +9 -36
- crypticorn/trade/client/api/notifications_api.py +18 -72
- crypticorn/trade/client/api/orders_api.py +3 -12
- crypticorn/trade/client/api/status_api.py +6 -24
- crypticorn/trade/client/api/strategies_api.py +15 -60
- crypticorn/trade/client/api/trading_actions_api.py +431 -112
- crypticorn/trade/client/configuration.py +2 -2
- crypticorn/trade/client/models/__init__.py +10 -0
- crypticorn/trade/client/models/paginated_response_futures_trading_action.py +134 -0
- crypticorn/trade/client/models/paginated_response_union_futures_trading_action_spot_trading_action.py +141 -0
- crypticorn/trade/client/models/paginated_response_union_futures_trading_action_spot_trading_action_data_inner.py +165 -0
- crypticorn/trade/client/models/spot_trading_action.py +207 -0
- {crypticorn-2.17.0rc5.dist-info → crypticorn-2.17.0rc6.dist-info}/METADATA +3 -3
- {crypticorn-2.17.0rc5.dist-info → crypticorn-2.17.0rc6.dist-info}/RECORD +62 -58
- {crypticorn-2.17.0rc5.dist-info → crypticorn-2.17.0rc6.dist-info}/WHEEL +0 -0
- {crypticorn-2.17.0rc5.dist-info → crypticorn-2.17.0rc6.dist-info}/entry_points.txt +0 -0
- {crypticorn-2.17.0rc5.dist-info → crypticorn-2.17.0rc6.dist-info}/licenses/LICENSE +0 -0
- {crypticorn-2.17.0rc5.dist-info → crypticorn-2.17.0rc6.dist-info}/top_level.txt +0 -0
@@ -23,6 +23,9 @@ from crypticorn.trade.client.models.bot import Bot
|
|
23
23
|
from crypticorn.trade.client.models.bot_create import BotCreate
|
24
24
|
from crypticorn.trade.client.models.bot_update import BotUpdate
|
25
25
|
from crypticorn.trade.client.models.orders_count import OrdersCount
|
26
|
+
from crypticorn.trade.client.models.paginated_response_futures_trading_action import (
|
27
|
+
PaginatedResponseFuturesTradingAction,
|
28
|
+
)
|
26
29
|
from crypticorn.trade.client.models.paginated_response_order import (
|
27
30
|
PaginatedResponseOrder,
|
28
31
|
)
|
@@ -80,10 +83,7 @@ class BotsApi:
|
|
80
83
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
81
84
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
82
85
|
) -> Bot:
|
83
|
-
"""Create Bot
|
84
|
-
|
85
|
-
This method can work in both sync and async modes based on the is_sync flag.
|
86
|
-
"""
|
86
|
+
"""Create Bot"""
|
87
87
|
if self.is_sync:
|
88
88
|
return self._create_bot_sync(
|
89
89
|
bot_create=bot_create,
|
@@ -120,10 +120,7 @@ class BotsApi:
|
|
120
120
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
121
121
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
122
122
|
) -> ApiResponse[Bot]:
|
123
|
-
"""Create Bot with HTTP info
|
124
|
-
|
125
|
-
This method can work in both sync and async modes based on the is_sync flag.
|
126
|
-
"""
|
123
|
+
"""Create Bot with HTTP info"""
|
127
124
|
if self.is_sync:
|
128
125
|
return self._create_bot_sync_with_http_info(
|
129
126
|
bot_create=bot_create,
|
@@ -160,10 +157,7 @@ class BotsApi:
|
|
160
157
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
161
158
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
162
159
|
) -> RESTResponseType:
|
163
|
-
"""Create Bot without preloading content
|
164
|
-
|
165
|
-
This method can work in both sync and async modes based on the is_sync flag.
|
166
|
-
"""
|
160
|
+
"""Create Bot without preloading content"""
|
167
161
|
if self.is_sync:
|
168
162
|
return self._create_bot_sync_without_preload_content(
|
169
163
|
bot_create=bot_create,
|
@@ -531,10 +525,7 @@ class BotsApi:
|
|
531
525
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
532
526
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
533
527
|
) -> None:
|
534
|
-
"""Delete Bot
|
535
|
-
|
536
|
-
This method can work in both sync and async modes based on the is_sync flag.
|
537
|
-
"""
|
528
|
+
"""Delete Bot"""
|
538
529
|
if self.is_sync:
|
539
530
|
return self._delete_bot_sync(
|
540
531
|
id=id,
|
@@ -571,10 +562,7 @@ class BotsApi:
|
|
571
562
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
572
563
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
573
564
|
) -> ApiResponse[None]:
|
574
|
-
"""Delete Bot with HTTP info
|
575
|
-
|
576
|
-
This method can work in both sync and async modes based on the is_sync flag.
|
577
|
-
"""
|
565
|
+
"""Delete Bot with HTTP info"""
|
578
566
|
if self.is_sync:
|
579
567
|
return self._delete_bot_sync_with_http_info(
|
580
568
|
id=id,
|
@@ -611,10 +599,7 @@ class BotsApi:
|
|
611
599
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
612
600
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
613
601
|
) -> RESTResponseType:
|
614
|
-
"""Delete Bot without preloading content
|
615
|
-
|
616
|
-
This method can work in both sync and async modes based on the is_sync flag.
|
617
|
-
"""
|
602
|
+
"""Delete Bot without preloading content"""
|
618
603
|
if self.is_sync:
|
619
604
|
return self._delete_bot_sync_without_preload_content(
|
620
605
|
id=id,
|
@@ -972,10 +957,7 @@ class BotsApi:
|
|
972
957
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
973
958
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
974
959
|
) -> Bot:
|
975
|
-
"""Get Bot
|
976
|
-
|
977
|
-
This method can work in both sync and async modes based on the is_sync flag.
|
978
|
-
"""
|
960
|
+
"""Get Bot"""
|
979
961
|
if self.is_sync:
|
980
962
|
return self._get_bot_sync(
|
981
963
|
id=id,
|
@@ -1012,10 +994,7 @@ class BotsApi:
|
|
1012
994
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1013
995
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1014
996
|
) -> ApiResponse[Bot]:
|
1015
|
-
"""Get Bot with HTTP info
|
1016
|
-
|
1017
|
-
This method can work in both sync and async modes based on the is_sync flag.
|
1018
|
-
"""
|
997
|
+
"""Get Bot with HTTP info"""
|
1019
998
|
if self.is_sync:
|
1020
999
|
return self._get_bot_sync_with_http_info(
|
1021
1000
|
id=id,
|
@@ -1052,10 +1031,7 @@ class BotsApi:
|
|
1052
1031
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1053
1032
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1054
1033
|
) -> RESTResponseType:
|
1055
|
-
"""Get Bot without preloading content
|
1056
|
-
|
1057
|
-
This method can work in both sync and async modes based on the is_sync flag.
|
1058
|
-
"""
|
1034
|
+
"""Get Bot without preloading content"""
|
1059
1035
|
if self.is_sync:
|
1060
1036
|
return self._get_bot_sync_without_preload_content(
|
1061
1037
|
id=id,
|
@@ -1395,7 +1371,7 @@ class BotsApi:
|
|
1395
1371
|
)
|
1396
1372
|
|
1397
1373
|
@validate_call
|
1398
|
-
def
|
1374
|
+
def get_bot_actions(
|
1399
1375
|
self,
|
1400
1376
|
id: Annotated[StrictStr, Field(description="The ID of the bot")],
|
1401
1377
|
sort_order: Annotated[
|
@@ -1436,13 +1412,10 @@ class BotsApi:
|
|
1436
1412
|
_content_type: Optional[StrictStr] = None,
|
1437
1413
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1438
1414
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1439
|
-
) ->
|
1440
|
-
"""Get Bot
|
1441
|
-
|
1442
|
-
This method can work in both sync and async modes based on the is_sync flag.
|
1443
|
-
"""
|
1415
|
+
) -> PaginatedResponseFuturesTradingAction:
|
1416
|
+
"""Get Bot Actions"""
|
1444
1417
|
if self.is_sync:
|
1445
|
-
return self.
|
1418
|
+
return self._get_bot_actions_sync(
|
1446
1419
|
id=id,
|
1447
1420
|
sort_order=sort_order,
|
1448
1421
|
sort_by=sort_by,
|
@@ -1459,7 +1432,7 @@ class BotsApi:
|
|
1459
1432
|
)
|
1460
1433
|
|
1461
1434
|
else:
|
1462
|
-
return self.
|
1435
|
+
return self._get_bot_actions_async(
|
1463
1436
|
id=id,
|
1464
1437
|
sort_order=sort_order,
|
1465
1438
|
sort_by=sort_by,
|
@@ -1476,7 +1449,7 @@ class BotsApi:
|
|
1476
1449
|
)
|
1477
1450
|
|
1478
1451
|
@validate_call
|
1479
|
-
def
|
1452
|
+
def get_bot_actions_with_http_info(
|
1480
1453
|
self,
|
1481
1454
|
id: Annotated[StrictStr, Field(description="The ID of the bot")],
|
1482
1455
|
sort_order: Annotated[
|
@@ -1517,13 +1490,10 @@ class BotsApi:
|
|
1517
1490
|
_content_type: Optional[StrictStr] = None,
|
1518
1491
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1519
1492
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1520
|
-
) -> ApiResponse[
|
1521
|
-
"""Get Bot
|
1522
|
-
|
1523
|
-
This method can work in both sync and async modes based on the is_sync flag.
|
1524
|
-
"""
|
1493
|
+
) -> ApiResponse[PaginatedResponseFuturesTradingAction]:
|
1494
|
+
"""Get Bot Actions with HTTP info"""
|
1525
1495
|
if self.is_sync:
|
1526
|
-
return self.
|
1496
|
+
return self._get_bot_actions_sync_with_http_info(
|
1527
1497
|
id=id,
|
1528
1498
|
sort_order=sort_order,
|
1529
1499
|
sort_by=sort_by,
|
@@ -1540,7 +1510,7 @@ class BotsApi:
|
|
1540
1510
|
)
|
1541
1511
|
|
1542
1512
|
else:
|
1543
|
-
return self.
|
1513
|
+
return self._get_bot_actions_async_with_http_info(
|
1544
1514
|
id=id,
|
1545
1515
|
sort_order=sort_order,
|
1546
1516
|
sort_by=sort_by,
|
@@ -1557,7 +1527,7 @@ class BotsApi:
|
|
1557
1527
|
)
|
1558
1528
|
|
1559
1529
|
@validate_call
|
1560
|
-
def
|
1530
|
+
def get_bot_actions_without_preload_content(
|
1561
1531
|
self,
|
1562
1532
|
id: Annotated[StrictStr, Field(description="The ID of the bot")],
|
1563
1533
|
sort_order: Annotated[
|
@@ -1599,12 +1569,9 @@ class BotsApi:
|
|
1599
1569
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1600
1570
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1601
1571
|
) -> RESTResponseType:
|
1602
|
-
"""Get Bot
|
1603
|
-
|
1604
|
-
This method can work in both sync and async modes based on the is_sync flag.
|
1605
|
-
"""
|
1572
|
+
"""Get Bot Actions without preloading content"""
|
1606
1573
|
if self.is_sync:
|
1607
|
-
return self.
|
1574
|
+
return self._get_bot_actions_sync_without_preload_content(
|
1608
1575
|
id=id,
|
1609
1576
|
sort_order=sort_order,
|
1610
1577
|
sort_by=sort_by,
|
@@ -1621,7 +1588,7 @@ class BotsApi:
|
|
1621
1588
|
)
|
1622
1589
|
|
1623
1590
|
else:
|
1624
|
-
return self.
|
1591
|
+
return self._get_bot_actions_async_without_preload_content(
|
1625
1592
|
id=id,
|
1626
1593
|
sort_order=sort_order,
|
1627
1594
|
sort_by=sort_by,
|
@@ -1639,7 +1606,7 @@ class BotsApi:
|
|
1639
1606
|
|
1640
1607
|
# Private async implementation methods
|
1641
1608
|
@validate_call
|
1642
|
-
async def
|
1609
|
+
async def _get_bot_actions_async(
|
1643
1610
|
self,
|
1644
1611
|
id: Annotated[StrictStr, Field(description="The ID of the bot")],
|
1645
1612
|
sort_order: Annotated[
|
@@ -1680,8 +1647,8 @@ class BotsApi:
|
|
1680
1647
|
_content_type: Optional[StrictStr] = None,
|
1681
1648
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1682
1649
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1683
|
-
) ->
|
1684
|
-
"""Get Bot
|
1650
|
+
) -> PaginatedResponseFuturesTradingAction:
|
1651
|
+
"""Get Bot Actions
|
1685
1652
|
|
1686
1653
|
Get all orders for a bot of the user
|
1687
1654
|
|
@@ -1723,7 +1690,7 @@ class BotsApi:
|
|
1723
1690
|
:return: Returns the result object.
|
1724
1691
|
""" # noqa: E501
|
1725
1692
|
|
1726
|
-
_param = self.
|
1693
|
+
_param = self._get_bot_actions_serialize(
|
1727
1694
|
id=id,
|
1728
1695
|
sort_order=sort_order,
|
1729
1696
|
sort_by=sort_by,
|
@@ -1739,7 +1706,7 @@ class BotsApi:
|
|
1739
1706
|
)
|
1740
1707
|
|
1741
1708
|
_response_types_map: Dict[str, Optional[str]] = {
|
1742
|
-
"200": "
|
1709
|
+
"200": "PaginatedResponseFuturesTradingAction",
|
1743
1710
|
}
|
1744
1711
|
response_data = await self.api_client.call_api(
|
1745
1712
|
*_param, _request_timeout=_request_timeout
|
@@ -1751,7 +1718,7 @@ class BotsApi:
|
|
1751
1718
|
).data
|
1752
1719
|
|
1753
1720
|
@validate_call
|
1754
|
-
async def
|
1721
|
+
async def _get_bot_actions_async_with_http_info(
|
1755
1722
|
self,
|
1756
1723
|
id: Annotated[StrictStr, Field(description="The ID of the bot")],
|
1757
1724
|
sort_order: Annotated[
|
@@ -1792,8 +1759,8 @@ class BotsApi:
|
|
1792
1759
|
_content_type: Optional[StrictStr] = None,
|
1793
1760
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1794
1761
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1795
|
-
) -> ApiResponse[
|
1796
|
-
"""Get Bot
|
1762
|
+
) -> ApiResponse[PaginatedResponseFuturesTradingAction]:
|
1763
|
+
"""Get Bot Actions
|
1797
1764
|
|
1798
1765
|
Get all orders for a bot of the user
|
1799
1766
|
|
@@ -1835,7 +1802,7 @@ class BotsApi:
|
|
1835
1802
|
:return: Returns the result object.
|
1836
1803
|
""" # noqa: E501
|
1837
1804
|
|
1838
|
-
_param = self.
|
1805
|
+
_param = self._get_bot_actions_serialize(
|
1839
1806
|
id=id,
|
1840
1807
|
sort_order=sort_order,
|
1841
1808
|
sort_by=sort_by,
|
@@ -1851,7 +1818,7 @@ class BotsApi:
|
|
1851
1818
|
)
|
1852
1819
|
|
1853
1820
|
_response_types_map: Dict[str, Optional[str]] = {
|
1854
|
-
"200": "
|
1821
|
+
"200": "PaginatedResponseFuturesTradingAction",
|
1855
1822
|
}
|
1856
1823
|
response_data = await self.api_client.call_api(
|
1857
1824
|
*_param, _request_timeout=_request_timeout
|
@@ -1862,7 +1829,7 @@ class BotsApi:
|
|
1862
1829
|
)
|
1863
1830
|
|
1864
1831
|
@validate_call
|
1865
|
-
async def
|
1832
|
+
async def _get_bot_actions_async_without_preload_content(
|
1866
1833
|
self,
|
1867
1834
|
id: Annotated[StrictStr, Field(description="The ID of the bot")],
|
1868
1835
|
sort_order: Annotated[
|
@@ -1904,7 +1871,7 @@ class BotsApi:
|
|
1904
1871
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1905
1872
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1906
1873
|
) -> RESTResponseType:
|
1907
|
-
"""Get Bot
|
1874
|
+
"""Get Bot Actions
|
1908
1875
|
|
1909
1876
|
Get all orders for a bot of the user
|
1910
1877
|
|
@@ -1946,7 +1913,7 @@ class BotsApi:
|
|
1946
1913
|
:return: Returns the result object.
|
1947
1914
|
""" # noqa: E501
|
1948
1915
|
|
1949
|
-
_param = self.
|
1916
|
+
_param = self._get_bot_actions_serialize(
|
1950
1917
|
id=id,
|
1951
1918
|
sort_order=sort_order,
|
1952
1919
|
sort_by=sort_by,
|
@@ -1962,7 +1929,7 @@ class BotsApi:
|
|
1962
1929
|
)
|
1963
1930
|
|
1964
1931
|
_response_types_map: Dict[str, Optional[str]] = {
|
1965
|
-
"200": "
|
1932
|
+
"200": "PaginatedResponseFuturesTradingAction",
|
1966
1933
|
}
|
1967
1934
|
response_data = await self.api_client.call_api(
|
1968
1935
|
*_param, _request_timeout=_request_timeout
|
@@ -1971,7 +1938,7 @@ class BotsApi:
|
|
1971
1938
|
|
1972
1939
|
# Private sync implementation methods
|
1973
1940
|
@validate_call
|
1974
|
-
def
|
1941
|
+
def _get_bot_actions_sync(
|
1975
1942
|
self,
|
1976
1943
|
id: Annotated[StrictStr, Field(description="The ID of the bot")],
|
1977
1944
|
sort_order: Annotated[
|
@@ -2012,9 +1979,9 @@ class BotsApi:
|
|
2012
1979
|
_content_type: Optional[StrictStr] = None,
|
2013
1980
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2014
1981
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2015
|
-
) ->
|
2016
|
-
"""Synchronous version of
|
2017
|
-
return async_to_sync(self.
|
1982
|
+
) -> PaginatedResponseFuturesTradingAction:
|
1983
|
+
"""Synchronous version of get_bot_actions"""
|
1984
|
+
return async_to_sync(self._get_bot_actions_async)(
|
2018
1985
|
id=id,
|
2019
1986
|
sort_order=sort_order,
|
2020
1987
|
sort_by=sort_by,
|
@@ -2031,7 +1998,7 @@ class BotsApi:
|
|
2031
1998
|
)
|
2032
1999
|
|
2033
2000
|
@validate_call
|
2034
|
-
def
|
2001
|
+
def _get_bot_actions_sync_with_http_info(
|
2035
2002
|
self,
|
2036
2003
|
id: Annotated[StrictStr, Field(description="The ID of the bot")],
|
2037
2004
|
sort_order: Annotated[
|
@@ -2072,9 +2039,9 @@ class BotsApi:
|
|
2072
2039
|
_content_type: Optional[StrictStr] = None,
|
2073
2040
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2074
2041
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2075
|
-
) -> ApiResponse[
|
2076
|
-
"""Synchronous version of
|
2077
|
-
return async_to_sync(self.
|
2042
|
+
) -> ApiResponse[PaginatedResponseFuturesTradingAction]:
|
2043
|
+
"""Synchronous version of get_bot_actions_with_http_info"""
|
2044
|
+
return async_to_sync(self._get_bot_actions_async_with_http_info)(
|
2078
2045
|
id=id,
|
2079
2046
|
sort_order=sort_order,
|
2080
2047
|
sort_by=sort_by,
|
@@ -2091,7 +2058,7 @@ class BotsApi:
|
|
2091
2058
|
)
|
2092
2059
|
|
2093
2060
|
@validate_call
|
2094
|
-
def
|
2061
|
+
def _get_bot_actions_sync_without_preload_content(
|
2095
2062
|
self,
|
2096
2063
|
id: Annotated[StrictStr, Field(description="The ID of the bot")],
|
2097
2064
|
sort_order: Annotated[
|
@@ -2133,8 +2100,8 @@ class BotsApi:
|
|
2133
2100
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2134
2101
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2135
2102
|
) -> RESTResponseType:
|
2136
|
-
"""Synchronous version of
|
2137
|
-
return async_to_sync(self.
|
2103
|
+
"""Synchronous version of get_bot_actions_without_preload_content"""
|
2104
|
+
return async_to_sync(self._get_bot_actions_async_without_preload_content)(
|
2138
2105
|
id=id,
|
2139
2106
|
sort_order=sort_order,
|
2140
2107
|
sort_by=sort_by,
|
@@ -2150,7 +2117,7 @@ class BotsApi:
|
|
2150
2117
|
_host_index=_host_index,
|
2151
2118
|
)
|
2152
2119
|
|
2153
|
-
def
|
2120
|
+
def _get_bot_actions_serialize(
|
2154
2121
|
self,
|
2155
2122
|
id,
|
2156
2123
|
sort_order,
|
@@ -2226,7 +2193,7 @@ class BotsApi:
|
|
2226
2193
|
|
2227
2194
|
return self.api_client.param_serialize(
|
2228
2195
|
method="GET",
|
2229
|
-
resource_path="/bots/{id}/
|
2196
|
+
resource_path="/bots/{id}/actions",
|
2230
2197
|
path_params=_path_params,
|
2231
2198
|
query_params=_query_params,
|
2232
2199
|
header_params=_header_params,
|
@@ -2240,7 +2207,7 @@ class BotsApi:
|
|
2240
2207
|
)
|
2241
2208
|
|
2242
2209
|
@validate_call
|
2243
|
-
def
|
2210
|
+
def get_bot_orders(
|
2244
2211
|
self,
|
2245
2212
|
id: Annotated[StrictStr, Field(description="The ID of the bot")],
|
2246
2213
|
sort_order: Annotated[
|
@@ -2249,10 +2216,25 @@ class BotsApi:
|
|
2249
2216
|
sort_by: Annotated[
|
2250
2217
|
Optional[StrictStr], Field(description="The field to sort by")
|
2251
2218
|
] = None,
|
2252
|
-
|
2219
|
+
filter_by: Annotated[
|
2220
|
+
Optional[StrictStr], Field(description="The field to filter by")
|
2221
|
+
] = None,
|
2222
|
+
filter_value: Annotated[
|
2223
|
+
Optional[StrictStr], Field(description="The value to filter with")
|
2224
|
+
] = None,
|
2225
|
+
page: Annotated[
|
2226
|
+
Optional[StrictInt], Field(description="The current page number")
|
2227
|
+
] = None,
|
2228
|
+
page_size: Annotated[
|
2229
|
+
Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
|
2230
|
+
Field(
|
2231
|
+
description="The number of items per page. Default is 100, max is 1000."
|
2232
|
+
),
|
2233
|
+
] = None,
|
2234
|
+
user_id: Annotated[
|
2253
2235
|
Optional[StrictStr],
|
2254
2236
|
Field(
|
2255
|
-
description="The
|
2237
|
+
description="The ID of the user. Overrides the authenticated user if provided and the user is an admin."
|
2256
2238
|
),
|
2257
2239
|
] = None,
|
2258
2240
|
_request_timeout: Union[
|
@@ -2266,17 +2248,18 @@ class BotsApi:
|
|
2266
2248
|
_content_type: Optional[StrictStr] = None,
|
2267
2249
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2268
2250
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2269
|
-
) ->
|
2270
|
-
"""Get Bot Orders
|
2271
|
-
|
2272
|
-
This method can work in both sync and async modes based on the is_sync flag.
|
2273
|
-
"""
|
2251
|
+
) -> PaginatedResponseOrder:
|
2252
|
+
"""Get Bot Orders"""
|
2274
2253
|
if self.is_sync:
|
2275
|
-
return self.
|
2254
|
+
return self._get_bot_orders_sync(
|
2276
2255
|
id=id,
|
2277
2256
|
sort_order=sort_order,
|
2278
2257
|
sort_by=sort_by,
|
2279
|
-
|
2258
|
+
filter_by=filter_by,
|
2259
|
+
filter_value=filter_value,
|
2260
|
+
page=page,
|
2261
|
+
page_size=page_size,
|
2262
|
+
user_id=user_id,
|
2280
2263
|
_request_timeout=_request_timeout,
|
2281
2264
|
_request_auth=_request_auth,
|
2282
2265
|
_content_type=_content_type,
|
@@ -2285,11 +2268,15 @@ class BotsApi:
|
|
2285
2268
|
)
|
2286
2269
|
|
2287
2270
|
else:
|
2288
|
-
return self.
|
2271
|
+
return self._get_bot_orders_async(
|
2289
2272
|
id=id,
|
2290
2273
|
sort_order=sort_order,
|
2291
2274
|
sort_by=sort_by,
|
2292
|
-
|
2275
|
+
filter_by=filter_by,
|
2276
|
+
filter_value=filter_value,
|
2277
|
+
page=page,
|
2278
|
+
page_size=page_size,
|
2279
|
+
user_id=user_id,
|
2293
2280
|
_request_timeout=_request_timeout,
|
2294
2281
|
_request_auth=_request_auth,
|
2295
2282
|
_content_type=_content_type,
|
@@ -2298,7 +2285,7 @@ class BotsApi:
|
|
2298
2285
|
)
|
2299
2286
|
|
2300
2287
|
@validate_call
|
2301
|
-
def
|
2288
|
+
def get_bot_orders_with_http_info(
|
2302
2289
|
self,
|
2303
2290
|
id: Annotated[StrictStr, Field(description="The ID of the bot")],
|
2304
2291
|
sort_order: Annotated[
|
@@ -2307,10 +2294,25 @@ class BotsApi:
|
|
2307
2294
|
sort_by: Annotated[
|
2308
2295
|
Optional[StrictStr], Field(description="The field to sort by")
|
2309
2296
|
] = None,
|
2310
|
-
|
2297
|
+
filter_by: Annotated[
|
2298
|
+
Optional[StrictStr], Field(description="The field to filter by")
|
2299
|
+
] = None,
|
2300
|
+
filter_value: Annotated[
|
2301
|
+
Optional[StrictStr], Field(description="The value to filter with")
|
2302
|
+
] = None,
|
2303
|
+
page: Annotated[
|
2304
|
+
Optional[StrictInt], Field(description="The current page number")
|
2305
|
+
] = None,
|
2306
|
+
page_size: Annotated[
|
2307
|
+
Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
|
2308
|
+
Field(
|
2309
|
+
description="The number of items per page. Default is 100, max is 1000."
|
2310
|
+
),
|
2311
|
+
] = None,
|
2312
|
+
user_id: Annotated[
|
2311
2313
|
Optional[StrictStr],
|
2312
2314
|
Field(
|
2313
|
-
description="The
|
2315
|
+
description="The ID of the user. Overrides the authenticated user if provided and the user is an admin."
|
2314
2316
|
),
|
2315
2317
|
] = None,
|
2316
2318
|
_request_timeout: Union[
|
@@ -2324,17 +2326,18 @@ class BotsApi:
|
|
2324
2326
|
_content_type: Optional[StrictStr] = None,
|
2325
2327
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2326
2328
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2327
|
-
) -> ApiResponse[
|
2328
|
-
"""Get Bot Orders
|
2329
|
-
|
2330
|
-
This method can work in both sync and async modes based on the is_sync flag.
|
2331
|
-
"""
|
2329
|
+
) -> ApiResponse[PaginatedResponseOrder]:
|
2330
|
+
"""Get Bot Orders with HTTP info"""
|
2332
2331
|
if self.is_sync:
|
2333
|
-
return self.
|
2332
|
+
return self._get_bot_orders_sync_with_http_info(
|
2334
2333
|
id=id,
|
2335
2334
|
sort_order=sort_order,
|
2336
2335
|
sort_by=sort_by,
|
2337
|
-
|
2336
|
+
filter_by=filter_by,
|
2337
|
+
filter_value=filter_value,
|
2338
|
+
page=page,
|
2339
|
+
page_size=page_size,
|
2340
|
+
user_id=user_id,
|
2338
2341
|
_request_timeout=_request_timeout,
|
2339
2342
|
_request_auth=_request_auth,
|
2340
2343
|
_content_type=_content_type,
|
@@ -2343,11 +2346,15 @@ class BotsApi:
|
|
2343
2346
|
)
|
2344
2347
|
|
2345
2348
|
else:
|
2346
|
-
return self.
|
2349
|
+
return self._get_bot_orders_async_with_http_info(
|
2347
2350
|
id=id,
|
2348
2351
|
sort_order=sort_order,
|
2349
2352
|
sort_by=sort_by,
|
2350
|
-
|
2353
|
+
filter_by=filter_by,
|
2354
|
+
filter_value=filter_value,
|
2355
|
+
page=page,
|
2356
|
+
page_size=page_size,
|
2357
|
+
user_id=user_id,
|
2351
2358
|
_request_timeout=_request_timeout,
|
2352
2359
|
_request_auth=_request_auth,
|
2353
2360
|
_content_type=_content_type,
|
@@ -2356,7 +2363,7 @@ class BotsApi:
|
|
2356
2363
|
)
|
2357
2364
|
|
2358
2365
|
@validate_call
|
2359
|
-
def
|
2366
|
+
def get_bot_orders_without_preload_content(
|
2360
2367
|
self,
|
2361
2368
|
id: Annotated[StrictStr, Field(description="The ID of the bot")],
|
2362
2369
|
sort_order: Annotated[
|
@@ -2365,10 +2372,25 @@ class BotsApi:
|
|
2365
2372
|
sort_by: Annotated[
|
2366
2373
|
Optional[StrictStr], Field(description="The field to sort by")
|
2367
2374
|
] = None,
|
2368
|
-
|
2375
|
+
filter_by: Annotated[
|
2376
|
+
Optional[StrictStr], Field(description="The field to filter by")
|
2377
|
+
] = None,
|
2378
|
+
filter_value: Annotated[
|
2379
|
+
Optional[StrictStr], Field(description="The value to filter with")
|
2380
|
+
] = None,
|
2381
|
+
page: Annotated[
|
2382
|
+
Optional[StrictInt], Field(description="The current page number")
|
2383
|
+
] = None,
|
2384
|
+
page_size: Annotated[
|
2385
|
+
Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
|
2386
|
+
Field(
|
2387
|
+
description="The number of items per page. Default is 100, max is 1000."
|
2388
|
+
),
|
2389
|
+
] = None,
|
2390
|
+
user_id: Annotated[
|
2369
2391
|
Optional[StrictStr],
|
2370
2392
|
Field(
|
2371
|
-
description="The
|
2393
|
+
description="The ID of the user. Overrides the authenticated user if provided and the user is an admin."
|
2372
2394
|
),
|
2373
2395
|
] = None,
|
2374
2396
|
_request_timeout: Union[
|
@@ -2383,16 +2405,17 @@ class BotsApi:
|
|
2383
2405
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2384
2406
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2385
2407
|
) -> RESTResponseType:
|
2386
|
-
"""Get Bot Orders
|
2387
|
-
|
2388
|
-
This method can work in both sync and async modes based on the is_sync flag.
|
2389
|
-
"""
|
2408
|
+
"""Get Bot Orders without preloading content"""
|
2390
2409
|
if self.is_sync:
|
2391
|
-
return self.
|
2410
|
+
return self._get_bot_orders_sync_without_preload_content(
|
2392
2411
|
id=id,
|
2393
2412
|
sort_order=sort_order,
|
2394
2413
|
sort_by=sort_by,
|
2395
|
-
|
2414
|
+
filter_by=filter_by,
|
2415
|
+
filter_value=filter_value,
|
2416
|
+
page=page,
|
2417
|
+
page_size=page_size,
|
2418
|
+
user_id=user_id,
|
2396
2419
|
_request_timeout=_request_timeout,
|
2397
2420
|
_request_auth=_request_auth,
|
2398
2421
|
_content_type=_content_type,
|
@@ -2401,11 +2424,15 @@ class BotsApi:
|
|
2401
2424
|
)
|
2402
2425
|
|
2403
2426
|
else:
|
2404
|
-
return self.
|
2427
|
+
return self._get_bot_orders_async_without_preload_content(
|
2405
2428
|
id=id,
|
2406
2429
|
sort_order=sort_order,
|
2407
2430
|
sort_by=sort_by,
|
2408
|
-
|
2431
|
+
filter_by=filter_by,
|
2432
|
+
filter_value=filter_value,
|
2433
|
+
page=page,
|
2434
|
+
page_size=page_size,
|
2435
|
+
user_id=user_id,
|
2409
2436
|
_request_timeout=_request_timeout,
|
2410
2437
|
_request_auth=_request_auth,
|
2411
2438
|
_content_type=_content_type,
|
@@ -2415,7 +2442,7 @@ class BotsApi:
|
|
2415
2442
|
|
2416
2443
|
# Private async implementation methods
|
2417
2444
|
@validate_call
|
2418
|
-
async def
|
2445
|
+
async def _get_bot_orders_async(
|
2419
2446
|
self,
|
2420
2447
|
id: Annotated[StrictStr, Field(description="The ID of the bot")],
|
2421
2448
|
sort_order: Annotated[
|
@@ -2424,10 +2451,25 @@ class BotsApi:
|
|
2424
2451
|
sort_by: Annotated[
|
2425
2452
|
Optional[StrictStr], Field(description="The field to sort by")
|
2426
2453
|
] = None,
|
2427
|
-
|
2454
|
+
filter_by: Annotated[
|
2455
|
+
Optional[StrictStr], Field(description="The field to filter by")
|
2456
|
+
] = None,
|
2457
|
+
filter_value: Annotated[
|
2458
|
+
Optional[StrictStr], Field(description="The value to filter with")
|
2459
|
+
] = None,
|
2460
|
+
page: Annotated[
|
2461
|
+
Optional[StrictInt], Field(description="The current page number")
|
2462
|
+
] = None,
|
2463
|
+
page_size: Annotated[
|
2464
|
+
Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
|
2465
|
+
Field(
|
2466
|
+
description="The number of items per page. Default is 100, max is 1000."
|
2467
|
+
),
|
2468
|
+
] = None,
|
2469
|
+
user_id: Annotated[
|
2428
2470
|
Optional[StrictStr],
|
2429
2471
|
Field(
|
2430
|
-
description="The
|
2472
|
+
description="The ID of the user. Overrides the authenticated user if provided and the user is an admin."
|
2431
2473
|
),
|
2432
2474
|
] = None,
|
2433
2475
|
_request_timeout: Union[
|
@@ -2441,10 +2483,10 @@ class BotsApi:
|
|
2441
2483
|
_content_type: Optional[StrictStr] = None,
|
2442
2484
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2443
2485
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2444
|
-
) ->
|
2445
|
-
"""Get Bot Orders
|
2486
|
+
) -> PaginatedResponseOrder:
|
2487
|
+
"""Get Bot Orders
|
2446
2488
|
|
2447
|
-
Get
|
2489
|
+
Get all orders for a bot of the user
|
2448
2490
|
|
2449
2491
|
:param id: The ID of the bot (required)
|
2450
2492
|
:type id: str
|
@@ -2452,8 +2494,16 @@ class BotsApi:
|
|
2452
2494
|
:type sort_order: str
|
2453
2495
|
:param sort_by: The field to sort by
|
2454
2496
|
:type sort_by: str
|
2455
|
-
:param
|
2456
|
-
:type
|
2497
|
+
:param filter_by: The field to filter by
|
2498
|
+
:type filter_by: str
|
2499
|
+
:param filter_value: The value to filter with
|
2500
|
+
:type filter_value: str
|
2501
|
+
:param page: The current page number
|
2502
|
+
:type page: int
|
2503
|
+
:param page_size: The number of items per page. Default is 100, max is 1000.
|
2504
|
+
:type page_size: int
|
2505
|
+
:param user_id: The ID of the user. Overrides the authenticated user if provided and the user is an admin.
|
2506
|
+
:type user_id: str
|
2457
2507
|
:param _request_timeout: timeout setting for this request. If one
|
2458
2508
|
number provided, it will be total request
|
2459
2509
|
timeout. It can also be a pair (tuple) of
|
@@ -2476,11 +2526,15 @@ class BotsApi:
|
|
2476
2526
|
:return: Returns the result object.
|
2477
2527
|
""" # noqa: E501
|
2478
2528
|
|
2479
|
-
_param = self.
|
2529
|
+
_param = self._get_bot_orders_serialize(
|
2480
2530
|
id=id,
|
2481
2531
|
sort_order=sort_order,
|
2482
2532
|
sort_by=sort_by,
|
2483
|
-
|
2533
|
+
filter_by=filter_by,
|
2534
|
+
filter_value=filter_value,
|
2535
|
+
page=page,
|
2536
|
+
page_size=page_size,
|
2537
|
+
user_id=user_id,
|
2484
2538
|
_request_auth=_request_auth,
|
2485
2539
|
_content_type=_content_type,
|
2486
2540
|
_headers=_headers,
|
@@ -2488,7 +2542,7 @@ class BotsApi:
|
|
2488
2542
|
)
|
2489
2543
|
|
2490
2544
|
_response_types_map: Dict[str, Optional[str]] = {
|
2491
|
-
"200": "
|
2545
|
+
"200": "PaginatedResponseOrder",
|
2492
2546
|
}
|
2493
2547
|
response_data = await self.api_client.call_api(
|
2494
2548
|
*_param, _request_timeout=_request_timeout
|
@@ -2500,7 +2554,7 @@ class BotsApi:
|
|
2500
2554
|
).data
|
2501
2555
|
|
2502
2556
|
@validate_call
|
2503
|
-
async def
|
2557
|
+
async def _get_bot_orders_async_with_http_info(
|
2504
2558
|
self,
|
2505
2559
|
id: Annotated[StrictStr, Field(description="The ID of the bot")],
|
2506
2560
|
sort_order: Annotated[
|
@@ -2509,10 +2563,25 @@ class BotsApi:
|
|
2509
2563
|
sort_by: Annotated[
|
2510
2564
|
Optional[StrictStr], Field(description="The field to sort by")
|
2511
2565
|
] = None,
|
2512
|
-
|
2566
|
+
filter_by: Annotated[
|
2567
|
+
Optional[StrictStr], Field(description="The field to filter by")
|
2568
|
+
] = None,
|
2569
|
+
filter_value: Annotated[
|
2570
|
+
Optional[StrictStr], Field(description="The value to filter with")
|
2571
|
+
] = None,
|
2572
|
+
page: Annotated[
|
2573
|
+
Optional[StrictInt], Field(description="The current page number")
|
2574
|
+
] = None,
|
2575
|
+
page_size: Annotated[
|
2576
|
+
Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
|
2577
|
+
Field(
|
2578
|
+
description="The number of items per page. Default is 100, max is 1000."
|
2579
|
+
),
|
2580
|
+
] = None,
|
2581
|
+
user_id: Annotated[
|
2513
2582
|
Optional[StrictStr],
|
2514
2583
|
Field(
|
2515
|
-
description="The
|
2584
|
+
description="The ID of the user. Overrides the authenticated user if provided and the user is an admin."
|
2516
2585
|
),
|
2517
2586
|
] = None,
|
2518
2587
|
_request_timeout: Union[
|
@@ -2526,10 +2595,10 @@ class BotsApi:
|
|
2526
2595
|
_content_type: Optional[StrictStr] = None,
|
2527
2596
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2528
2597
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2529
|
-
) -> ApiResponse[
|
2530
|
-
"""Get Bot Orders
|
2598
|
+
) -> ApiResponse[PaginatedResponseOrder]:
|
2599
|
+
"""Get Bot Orders
|
2531
2600
|
|
2532
|
-
Get
|
2601
|
+
Get all orders for a bot of the user
|
2533
2602
|
|
2534
2603
|
:param id: The ID of the bot (required)
|
2535
2604
|
:type id: str
|
@@ -2537,12 +2606,20 @@ class BotsApi:
|
|
2537
2606
|
:type sort_order: str
|
2538
2607
|
:param sort_by: The field to sort by
|
2539
2608
|
:type sort_by: str
|
2540
|
-
:param
|
2541
|
-
:type
|
2542
|
-
:param
|
2543
|
-
|
2544
|
-
|
2545
|
-
|
2609
|
+
:param filter_by: The field to filter by
|
2610
|
+
:type filter_by: str
|
2611
|
+
:param filter_value: The value to filter with
|
2612
|
+
:type filter_value: str
|
2613
|
+
:param page: The current page number
|
2614
|
+
:type page: int
|
2615
|
+
:param page_size: The number of items per page. Default is 100, max is 1000.
|
2616
|
+
:type page_size: int
|
2617
|
+
:param user_id: The ID of the user. Overrides the authenticated user if provided and the user is an admin.
|
2618
|
+
:type user_id: str
|
2619
|
+
:param _request_timeout: timeout setting for this request. If one
|
2620
|
+
number provided, it will be total request
|
2621
|
+
timeout. It can also be a pair (tuple) of
|
2622
|
+
(connection, read) timeouts.
|
2546
2623
|
:type _request_timeout: int, tuple(int, int), optional
|
2547
2624
|
:param _request_auth: set to override the auth_settings for an a single
|
2548
2625
|
request; this effectively ignores the
|
@@ -2561,11 +2638,15 @@ class BotsApi:
|
|
2561
2638
|
:return: Returns the result object.
|
2562
2639
|
""" # noqa: E501
|
2563
2640
|
|
2564
|
-
_param = self.
|
2641
|
+
_param = self._get_bot_orders_serialize(
|
2565
2642
|
id=id,
|
2566
2643
|
sort_order=sort_order,
|
2567
2644
|
sort_by=sort_by,
|
2568
|
-
|
2645
|
+
filter_by=filter_by,
|
2646
|
+
filter_value=filter_value,
|
2647
|
+
page=page,
|
2648
|
+
page_size=page_size,
|
2649
|
+
user_id=user_id,
|
2569
2650
|
_request_auth=_request_auth,
|
2570
2651
|
_content_type=_content_type,
|
2571
2652
|
_headers=_headers,
|
@@ -2573,7 +2654,7 @@ class BotsApi:
|
|
2573
2654
|
)
|
2574
2655
|
|
2575
2656
|
_response_types_map: Dict[str, Optional[str]] = {
|
2576
|
-
"200": "
|
2657
|
+
"200": "PaginatedResponseOrder",
|
2577
2658
|
}
|
2578
2659
|
response_data = await self.api_client.call_api(
|
2579
2660
|
*_param, _request_timeout=_request_timeout
|
@@ -2584,7 +2665,7 @@ class BotsApi:
|
|
2584
2665
|
)
|
2585
2666
|
|
2586
2667
|
@validate_call
|
2587
|
-
async def
|
2668
|
+
async def _get_bot_orders_async_without_preload_content(
|
2588
2669
|
self,
|
2589
2670
|
id: Annotated[StrictStr, Field(description="The ID of the bot")],
|
2590
2671
|
sort_order: Annotated[
|
@@ -2593,10 +2674,25 @@ class BotsApi:
|
|
2593
2674
|
sort_by: Annotated[
|
2594
2675
|
Optional[StrictStr], Field(description="The field to sort by")
|
2595
2676
|
] = None,
|
2596
|
-
|
2677
|
+
filter_by: Annotated[
|
2678
|
+
Optional[StrictStr], Field(description="The field to filter by")
|
2679
|
+
] = None,
|
2680
|
+
filter_value: Annotated[
|
2681
|
+
Optional[StrictStr], Field(description="The value to filter with")
|
2682
|
+
] = None,
|
2683
|
+
page: Annotated[
|
2684
|
+
Optional[StrictInt], Field(description="The current page number")
|
2685
|
+
] = None,
|
2686
|
+
page_size: Annotated[
|
2687
|
+
Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
|
2688
|
+
Field(
|
2689
|
+
description="The number of items per page. Default is 100, max is 1000."
|
2690
|
+
),
|
2691
|
+
] = None,
|
2692
|
+
user_id: Annotated[
|
2597
2693
|
Optional[StrictStr],
|
2598
2694
|
Field(
|
2599
|
-
description="The
|
2695
|
+
description="The ID of the user. Overrides the authenticated user if provided and the user is an admin."
|
2600
2696
|
),
|
2601
2697
|
] = None,
|
2602
2698
|
_request_timeout: Union[
|
@@ -2611,9 +2707,9 @@ class BotsApi:
|
|
2611
2707
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2612
2708
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2613
2709
|
) -> RESTResponseType:
|
2614
|
-
"""Get Bot Orders
|
2710
|
+
"""Get Bot Orders
|
2615
2711
|
|
2616
|
-
Get
|
2712
|
+
Get all orders for a bot of the user
|
2617
2713
|
|
2618
2714
|
:param id: The ID of the bot (required)
|
2619
2715
|
:type id: str
|
@@ -2621,8 +2717,16 @@ class BotsApi:
|
|
2621
2717
|
:type sort_order: str
|
2622
2718
|
:param sort_by: The field to sort by
|
2623
2719
|
:type sort_by: str
|
2624
|
-
:param
|
2625
|
-
:type
|
2720
|
+
:param filter_by: The field to filter by
|
2721
|
+
:type filter_by: str
|
2722
|
+
:param filter_value: The value to filter with
|
2723
|
+
:type filter_value: str
|
2724
|
+
:param page: The current page number
|
2725
|
+
:type page: int
|
2726
|
+
:param page_size: The number of items per page. Default is 100, max is 1000.
|
2727
|
+
:type page_size: int
|
2728
|
+
:param user_id: The ID of the user. Overrides the authenticated user if provided and the user is an admin.
|
2729
|
+
:type user_id: str
|
2626
2730
|
:param _request_timeout: timeout setting for this request. If one
|
2627
2731
|
number provided, it will be total request
|
2628
2732
|
timeout. It can also be a pair (tuple) of
|
@@ -2645,11 +2749,15 @@ class BotsApi:
|
|
2645
2749
|
:return: Returns the result object.
|
2646
2750
|
""" # noqa: E501
|
2647
2751
|
|
2648
|
-
_param = self.
|
2752
|
+
_param = self._get_bot_orders_serialize(
|
2649
2753
|
id=id,
|
2650
2754
|
sort_order=sort_order,
|
2651
2755
|
sort_by=sort_by,
|
2652
|
-
|
2756
|
+
filter_by=filter_by,
|
2757
|
+
filter_value=filter_value,
|
2758
|
+
page=page,
|
2759
|
+
page_size=page_size,
|
2760
|
+
user_id=user_id,
|
2653
2761
|
_request_auth=_request_auth,
|
2654
2762
|
_content_type=_content_type,
|
2655
2763
|
_headers=_headers,
|
@@ -2657,7 +2765,7 @@ class BotsApi:
|
|
2657
2765
|
)
|
2658
2766
|
|
2659
2767
|
_response_types_map: Dict[str, Optional[str]] = {
|
2660
|
-
"200": "
|
2768
|
+
"200": "PaginatedResponseOrder",
|
2661
2769
|
}
|
2662
2770
|
response_data = await self.api_client.call_api(
|
2663
2771
|
*_param, _request_timeout=_request_timeout
|
@@ -2666,7 +2774,7 @@ class BotsApi:
|
|
2666
2774
|
|
2667
2775
|
# Private sync implementation methods
|
2668
2776
|
@validate_call
|
2669
|
-
def
|
2777
|
+
def _get_bot_orders_sync(
|
2670
2778
|
self,
|
2671
2779
|
id: Annotated[StrictStr, Field(description="The ID of the bot")],
|
2672
2780
|
sort_order: Annotated[
|
@@ -2675,10 +2783,25 @@ class BotsApi:
|
|
2675
2783
|
sort_by: Annotated[
|
2676
2784
|
Optional[StrictStr], Field(description="The field to sort by")
|
2677
2785
|
] = None,
|
2678
|
-
|
2786
|
+
filter_by: Annotated[
|
2787
|
+
Optional[StrictStr], Field(description="The field to filter by")
|
2788
|
+
] = None,
|
2789
|
+
filter_value: Annotated[
|
2790
|
+
Optional[StrictStr], Field(description="The value to filter with")
|
2791
|
+
] = None,
|
2792
|
+
page: Annotated[
|
2793
|
+
Optional[StrictInt], Field(description="The current page number")
|
2794
|
+
] = None,
|
2795
|
+
page_size: Annotated[
|
2796
|
+
Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
|
2797
|
+
Field(
|
2798
|
+
description="The number of items per page. Default is 100, max is 1000."
|
2799
|
+
),
|
2800
|
+
] = None,
|
2801
|
+
user_id: Annotated[
|
2679
2802
|
Optional[StrictStr],
|
2680
2803
|
Field(
|
2681
|
-
description="The
|
2804
|
+
description="The ID of the user. Overrides the authenticated user if provided and the user is an admin."
|
2682
2805
|
),
|
2683
2806
|
] = None,
|
2684
2807
|
_request_timeout: Union[
|
@@ -2692,13 +2815,17 @@ class BotsApi:
|
|
2692
2815
|
_content_type: Optional[StrictStr] = None,
|
2693
2816
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2694
2817
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2695
|
-
) ->
|
2696
|
-
"""Synchronous version of
|
2697
|
-
return async_to_sync(self.
|
2818
|
+
) -> PaginatedResponseOrder:
|
2819
|
+
"""Synchronous version of get_bot_orders"""
|
2820
|
+
return async_to_sync(self._get_bot_orders_async)(
|
2698
2821
|
id=id,
|
2699
2822
|
sort_order=sort_order,
|
2700
2823
|
sort_by=sort_by,
|
2701
|
-
|
2824
|
+
filter_by=filter_by,
|
2825
|
+
filter_value=filter_value,
|
2826
|
+
page=page,
|
2827
|
+
page_size=page_size,
|
2828
|
+
user_id=user_id,
|
2702
2829
|
_request_timeout=_request_timeout,
|
2703
2830
|
_request_auth=_request_auth,
|
2704
2831
|
_content_type=_content_type,
|
@@ -2707,7 +2834,7 @@ class BotsApi:
|
|
2707
2834
|
)
|
2708
2835
|
|
2709
2836
|
@validate_call
|
2710
|
-
def
|
2837
|
+
def _get_bot_orders_sync_with_http_info(
|
2711
2838
|
self,
|
2712
2839
|
id: Annotated[StrictStr, Field(description="The ID of the bot")],
|
2713
2840
|
sort_order: Annotated[
|
@@ -2716,10 +2843,25 @@ class BotsApi:
|
|
2716
2843
|
sort_by: Annotated[
|
2717
2844
|
Optional[StrictStr], Field(description="The field to sort by")
|
2718
2845
|
] = None,
|
2719
|
-
|
2846
|
+
filter_by: Annotated[
|
2847
|
+
Optional[StrictStr], Field(description="The field to filter by")
|
2848
|
+
] = None,
|
2849
|
+
filter_value: Annotated[
|
2850
|
+
Optional[StrictStr], Field(description="The value to filter with")
|
2851
|
+
] = None,
|
2852
|
+
page: Annotated[
|
2853
|
+
Optional[StrictInt], Field(description="The current page number")
|
2854
|
+
] = None,
|
2855
|
+
page_size: Annotated[
|
2856
|
+
Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
|
2857
|
+
Field(
|
2858
|
+
description="The number of items per page. Default is 100, max is 1000."
|
2859
|
+
),
|
2860
|
+
] = None,
|
2861
|
+
user_id: Annotated[
|
2720
2862
|
Optional[StrictStr],
|
2721
2863
|
Field(
|
2722
|
-
description="The
|
2864
|
+
description="The ID of the user. Overrides the authenticated user if provided and the user is an admin."
|
2723
2865
|
),
|
2724
2866
|
] = None,
|
2725
2867
|
_request_timeout: Union[
|
@@ -2733,13 +2875,17 @@ class BotsApi:
|
|
2733
2875
|
_content_type: Optional[StrictStr] = None,
|
2734
2876
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2735
2877
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2736
|
-
) -> ApiResponse[
|
2737
|
-
"""Synchronous version of
|
2738
|
-
return async_to_sync(self.
|
2878
|
+
) -> ApiResponse[PaginatedResponseOrder]:
|
2879
|
+
"""Synchronous version of get_bot_orders_with_http_info"""
|
2880
|
+
return async_to_sync(self._get_bot_orders_async_with_http_info)(
|
2739
2881
|
id=id,
|
2740
2882
|
sort_order=sort_order,
|
2741
2883
|
sort_by=sort_by,
|
2742
|
-
|
2884
|
+
filter_by=filter_by,
|
2885
|
+
filter_value=filter_value,
|
2886
|
+
page=page,
|
2887
|
+
page_size=page_size,
|
2888
|
+
user_id=user_id,
|
2743
2889
|
_request_timeout=_request_timeout,
|
2744
2890
|
_request_auth=_request_auth,
|
2745
2891
|
_content_type=_content_type,
|
@@ -2748,7 +2894,7 @@ class BotsApi:
|
|
2748
2894
|
)
|
2749
2895
|
|
2750
2896
|
@validate_call
|
2751
|
-
def
|
2897
|
+
def _get_bot_orders_sync_without_preload_content(
|
2752
2898
|
self,
|
2753
2899
|
id: Annotated[StrictStr, Field(description="The ID of the bot")],
|
2754
2900
|
sort_order: Annotated[
|
@@ -2757,10 +2903,25 @@ class BotsApi:
|
|
2757
2903
|
sort_by: Annotated[
|
2758
2904
|
Optional[StrictStr], Field(description="The field to sort by")
|
2759
2905
|
] = None,
|
2760
|
-
|
2906
|
+
filter_by: Annotated[
|
2907
|
+
Optional[StrictStr], Field(description="The field to filter by")
|
2908
|
+
] = None,
|
2909
|
+
filter_value: Annotated[
|
2910
|
+
Optional[StrictStr], Field(description="The value to filter with")
|
2911
|
+
] = None,
|
2912
|
+
page: Annotated[
|
2913
|
+
Optional[StrictInt], Field(description="The current page number")
|
2914
|
+
] = None,
|
2915
|
+
page_size: Annotated[
|
2916
|
+
Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
|
2917
|
+
Field(
|
2918
|
+
description="The number of items per page. Default is 100, max is 1000."
|
2919
|
+
),
|
2920
|
+
] = None,
|
2921
|
+
user_id: Annotated[
|
2761
2922
|
Optional[StrictStr],
|
2762
2923
|
Field(
|
2763
|
-
description="The
|
2924
|
+
description="The ID of the user. Overrides the authenticated user if provided and the user is an admin."
|
2764
2925
|
),
|
2765
2926
|
] = None,
|
2766
2927
|
_request_timeout: Union[
|
@@ -2775,12 +2936,16 @@ class BotsApi:
|
|
2775
2936
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2776
2937
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2777
2938
|
) -> RESTResponseType:
|
2778
|
-
"""Synchronous version of
|
2779
|
-
return async_to_sync(self.
|
2939
|
+
"""Synchronous version of get_bot_orders_without_preload_content"""
|
2940
|
+
return async_to_sync(self._get_bot_orders_async_without_preload_content)(
|
2780
2941
|
id=id,
|
2781
2942
|
sort_order=sort_order,
|
2782
2943
|
sort_by=sort_by,
|
2783
|
-
|
2944
|
+
filter_by=filter_by,
|
2945
|
+
filter_value=filter_value,
|
2946
|
+
page=page,
|
2947
|
+
page_size=page_size,
|
2948
|
+
user_id=user_id,
|
2784
2949
|
_request_timeout=_request_timeout,
|
2785
2950
|
_request_auth=_request_auth,
|
2786
2951
|
_content_type=_content_type,
|
@@ -2788,12 +2953,16 @@ class BotsApi:
|
|
2788
2953
|
_host_index=_host_index,
|
2789
2954
|
)
|
2790
2955
|
|
2791
|
-
def
|
2956
|
+
def _get_bot_orders_serialize(
|
2792
2957
|
self,
|
2793
2958
|
id,
|
2794
2959
|
sort_order,
|
2795
2960
|
sort_by,
|
2796
|
-
|
2961
|
+
filter_by,
|
2962
|
+
filter_value,
|
2963
|
+
page,
|
2964
|
+
page_size,
|
2965
|
+
user_id,
|
2797
2966
|
_request_auth,
|
2798
2967
|
_content_type,
|
2799
2968
|
_headers,
|
@@ -2825,9 +2994,25 @@ class BotsApi:
|
|
2825
2994
|
|
2826
2995
|
_query_params.append(("sort_by", sort_by))
|
2827
2996
|
|
2828
|
-
if
|
2997
|
+
if filter_by is not None:
|
2829
2998
|
|
2830
|
-
_query_params.append(("
|
2999
|
+
_query_params.append(("filter_by", filter_by))
|
3000
|
+
|
3001
|
+
if filter_value is not None:
|
3002
|
+
|
3003
|
+
_query_params.append(("filter_value", filter_value))
|
3004
|
+
|
3005
|
+
if page is not None:
|
3006
|
+
|
3007
|
+
_query_params.append(("page", page))
|
3008
|
+
|
3009
|
+
if page_size is not None:
|
3010
|
+
|
3011
|
+
_query_params.append(("page_size", page_size))
|
3012
|
+
|
3013
|
+
if user_id is not None:
|
3014
|
+
|
3015
|
+
_query_params.append(("user_id", user_id))
|
2831
3016
|
|
2832
3017
|
# process the header parameters
|
2833
3018
|
# process the form parameters
|
@@ -2844,7 +3029,7 @@ class BotsApi:
|
|
2844
3029
|
|
2845
3030
|
return self.api_client.param_serialize(
|
2846
3031
|
method="GET",
|
2847
|
-
resource_path="/bots/{id}/orders
|
3032
|
+
resource_path="/bots/{id}/orders",
|
2848
3033
|
path_params=_path_params,
|
2849
3034
|
query_params=_query_params,
|
2850
3035
|
header_params=_header_params,
|
@@ -2858,7 +3043,7 @@ class BotsApi:
|
|
2858
3043
|
)
|
2859
3044
|
|
2860
3045
|
@validate_call
|
2861
|
-
def
|
3046
|
+
def get_bot_orders_count(
|
2862
3047
|
self,
|
2863
3048
|
id: Annotated[StrictStr, Field(description="The ID of the bot")],
|
2864
3049
|
sort_order: Annotated[
|
@@ -2867,28 +3052,10 @@ class BotsApi:
|
|
2867
3052
|
sort_by: Annotated[
|
2868
3053
|
Optional[StrictStr], Field(description="The field to sort by")
|
2869
3054
|
] = None,
|
2870
|
-
|
2871
|
-
Optional[StrictStr],
|
2872
|
-
Field(
|
2873
|
-
description="Time window for PnL. Defaults to full (all time), or use period (last X days), month, quarter, or year for values since the start of that range."
|
2874
|
-
),
|
2875
|
-
] = None,
|
2876
|
-
period: Annotated[
|
2877
|
-
Optional[Annotated[int, Field(le=365, strict=True, ge=1)]],
|
2878
|
-
Field(
|
2879
|
-
description="The number of days to return the PnL for. Only used if `window` is `period`. Default is 30."
|
2880
|
-
),
|
2881
|
-
] = None,
|
2882
|
-
user_id: Annotated[
|
3055
|
+
group_by: Annotated[
|
2883
3056
|
Optional[StrictStr],
|
2884
3057
|
Field(
|
2885
|
-
description="The
|
2886
|
-
),
|
2887
|
-
] = None,
|
2888
|
-
limit: Annotated[
|
2889
|
-
Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
|
2890
|
-
Field(
|
2891
|
-
description="The number of items to return. Defaults to None, meaning no limit."
|
3058
|
+
description="The group by period for the orders count. Defaults to day."
|
2892
3059
|
),
|
2893
3060
|
] = None,
|
2894
3061
|
_request_timeout: Union[
|
@@ -2902,20 +3069,14 @@ class BotsApi:
|
|
2902
3069
|
_content_type: Optional[StrictStr] = None,
|
2903
3070
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2904
3071
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2905
|
-
) -> List[
|
2906
|
-
"""Get Bot
|
2907
|
-
|
2908
|
-
This method can work in both sync and async modes based on the is_sync flag.
|
2909
|
-
"""
|
3072
|
+
) -> List[OrdersCount]:
|
3073
|
+
"""Get Bot Orders Count"""
|
2910
3074
|
if self.is_sync:
|
2911
|
-
return self.
|
3075
|
+
return self._get_bot_orders_count_sync(
|
2912
3076
|
id=id,
|
2913
3077
|
sort_order=sort_order,
|
2914
3078
|
sort_by=sort_by,
|
2915
|
-
|
2916
|
-
period=period,
|
2917
|
-
user_id=user_id,
|
2918
|
-
limit=limit,
|
3079
|
+
group_by=group_by,
|
2919
3080
|
_request_timeout=_request_timeout,
|
2920
3081
|
_request_auth=_request_auth,
|
2921
3082
|
_content_type=_content_type,
|
@@ -2924,14 +3085,11 @@ class BotsApi:
|
|
2924
3085
|
)
|
2925
3086
|
|
2926
3087
|
else:
|
2927
|
-
return self.
|
3088
|
+
return self._get_bot_orders_count_async(
|
2928
3089
|
id=id,
|
2929
3090
|
sort_order=sort_order,
|
2930
3091
|
sort_by=sort_by,
|
2931
|
-
|
2932
|
-
period=period,
|
2933
|
-
user_id=user_id,
|
2934
|
-
limit=limit,
|
3092
|
+
group_by=group_by,
|
2935
3093
|
_request_timeout=_request_timeout,
|
2936
3094
|
_request_auth=_request_auth,
|
2937
3095
|
_content_type=_content_type,
|
@@ -2940,7 +3098,7 @@ class BotsApi:
|
|
2940
3098
|
)
|
2941
3099
|
|
2942
3100
|
@validate_call
|
2943
|
-
def
|
3101
|
+
def get_bot_orders_count_with_http_info(
|
2944
3102
|
self,
|
2945
3103
|
id: Annotated[StrictStr, Field(description="The ID of the bot")],
|
2946
3104
|
sort_order: Annotated[
|
@@ -2949,28 +3107,10 @@ class BotsApi:
|
|
2949
3107
|
sort_by: Annotated[
|
2950
3108
|
Optional[StrictStr], Field(description="The field to sort by")
|
2951
3109
|
] = None,
|
2952
|
-
|
3110
|
+
group_by: Annotated[
|
2953
3111
|
Optional[StrictStr],
|
2954
3112
|
Field(
|
2955
|
-
description="
|
2956
|
-
),
|
2957
|
-
] = None,
|
2958
|
-
period: Annotated[
|
2959
|
-
Optional[Annotated[int, Field(le=365, strict=True, ge=1)]],
|
2960
|
-
Field(
|
2961
|
-
description="The number of days to return the PnL for. Only used if `window` is `period`. Default is 30."
|
2962
|
-
),
|
2963
|
-
] = None,
|
2964
|
-
user_id: Annotated[
|
2965
|
-
Optional[StrictStr],
|
2966
|
-
Field(
|
2967
|
-
description="The ID of the user. Defaults to the authenticated user, unless user is an admin."
|
2968
|
-
),
|
2969
|
-
] = None,
|
2970
|
-
limit: Annotated[
|
2971
|
-
Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
|
2972
|
-
Field(
|
2973
|
-
description="The number of items to return. Defaults to None, meaning no limit."
|
3113
|
+
description="The group by period for the orders count. Defaults to day."
|
2974
3114
|
),
|
2975
3115
|
] = None,
|
2976
3116
|
_request_timeout: Union[
|
@@ -2984,20 +3124,14 @@ class BotsApi:
|
|
2984
3124
|
_content_type: Optional[StrictStr] = None,
|
2985
3125
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2986
3126
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2987
|
-
) -> ApiResponse[List[
|
2988
|
-
"""Get Bot
|
2989
|
-
|
2990
|
-
This method can work in both sync and async modes based on the is_sync flag.
|
2991
|
-
"""
|
3127
|
+
) -> ApiResponse[List[OrdersCount]]:
|
3128
|
+
"""Get Bot Orders Count with HTTP info"""
|
2992
3129
|
if self.is_sync:
|
2993
|
-
return self.
|
3130
|
+
return self._get_bot_orders_count_sync_with_http_info(
|
2994
3131
|
id=id,
|
2995
3132
|
sort_order=sort_order,
|
2996
3133
|
sort_by=sort_by,
|
2997
|
-
|
2998
|
-
period=period,
|
2999
|
-
user_id=user_id,
|
3000
|
-
limit=limit,
|
3134
|
+
group_by=group_by,
|
3001
3135
|
_request_timeout=_request_timeout,
|
3002
3136
|
_request_auth=_request_auth,
|
3003
3137
|
_content_type=_content_type,
|
@@ -3006,14 +3140,11 @@ class BotsApi:
|
|
3006
3140
|
)
|
3007
3141
|
|
3008
3142
|
else:
|
3009
|
-
return self.
|
3143
|
+
return self._get_bot_orders_count_async_with_http_info(
|
3010
3144
|
id=id,
|
3011
3145
|
sort_order=sort_order,
|
3012
3146
|
sort_by=sort_by,
|
3013
|
-
|
3014
|
-
period=period,
|
3015
|
-
user_id=user_id,
|
3016
|
-
limit=limit,
|
3147
|
+
group_by=group_by,
|
3017
3148
|
_request_timeout=_request_timeout,
|
3018
3149
|
_request_auth=_request_auth,
|
3019
3150
|
_content_type=_content_type,
|
@@ -3022,7 +3153,7 @@ class BotsApi:
|
|
3022
3153
|
)
|
3023
3154
|
|
3024
3155
|
@validate_call
|
3025
|
-
def
|
3156
|
+
def get_bot_orders_count_without_preload_content(
|
3026
3157
|
self,
|
3027
3158
|
id: Annotated[StrictStr, Field(description="The ID of the bot")],
|
3028
3159
|
sort_order: Annotated[
|
@@ -3031,28 +3162,10 @@ class BotsApi:
|
|
3031
3162
|
sort_by: Annotated[
|
3032
3163
|
Optional[StrictStr], Field(description="The field to sort by")
|
3033
3164
|
] = None,
|
3034
|
-
|
3035
|
-
Optional[StrictStr],
|
3036
|
-
Field(
|
3037
|
-
description="Time window for PnL. Defaults to full (all time), or use period (last X days), month, quarter, or year for values since the start of that range."
|
3038
|
-
),
|
3039
|
-
] = None,
|
3040
|
-
period: Annotated[
|
3041
|
-
Optional[Annotated[int, Field(le=365, strict=True, ge=1)]],
|
3042
|
-
Field(
|
3043
|
-
description="The number of days to return the PnL for. Only used if `window` is `period`. Default is 30."
|
3044
|
-
),
|
3045
|
-
] = None,
|
3046
|
-
user_id: Annotated[
|
3165
|
+
group_by: Annotated[
|
3047
3166
|
Optional[StrictStr],
|
3048
3167
|
Field(
|
3049
|
-
description="The
|
3050
|
-
),
|
3051
|
-
] = None,
|
3052
|
-
limit: Annotated[
|
3053
|
-
Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
|
3054
|
-
Field(
|
3055
|
-
description="The number of items to return. Defaults to None, meaning no limit."
|
3168
|
+
description="The group by period for the orders count. Defaults to day."
|
3056
3169
|
),
|
3057
3170
|
] = None,
|
3058
3171
|
_request_timeout: Union[
|
@@ -3067,19 +3180,13 @@ class BotsApi:
|
|
3067
3180
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
3068
3181
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
3069
3182
|
) -> RESTResponseType:
|
3070
|
-
"""Get Bot
|
3071
|
-
|
3072
|
-
This method can work in both sync and async modes based on the is_sync flag.
|
3073
|
-
"""
|
3183
|
+
"""Get Bot Orders Count without preloading content"""
|
3074
3184
|
if self.is_sync:
|
3075
|
-
return self.
|
3185
|
+
return self._get_bot_orders_count_sync_without_preload_content(
|
3076
3186
|
id=id,
|
3077
3187
|
sort_order=sort_order,
|
3078
3188
|
sort_by=sort_by,
|
3079
|
-
|
3080
|
-
period=period,
|
3081
|
-
user_id=user_id,
|
3082
|
-
limit=limit,
|
3189
|
+
group_by=group_by,
|
3083
3190
|
_request_timeout=_request_timeout,
|
3084
3191
|
_request_auth=_request_auth,
|
3085
3192
|
_content_type=_content_type,
|
@@ -3088,14 +3195,11 @@ class BotsApi:
|
|
3088
3195
|
)
|
3089
3196
|
|
3090
3197
|
else:
|
3091
|
-
return self.
|
3198
|
+
return self._get_bot_orders_count_async_without_preload_content(
|
3092
3199
|
id=id,
|
3093
3200
|
sort_order=sort_order,
|
3094
3201
|
sort_by=sort_by,
|
3095
|
-
|
3096
|
-
period=period,
|
3097
|
-
user_id=user_id,
|
3098
|
-
limit=limit,
|
3202
|
+
group_by=group_by,
|
3099
3203
|
_request_timeout=_request_timeout,
|
3100
3204
|
_request_auth=_request_auth,
|
3101
3205
|
_content_type=_content_type,
|
@@ -3105,7 +3209,7 @@ class BotsApi:
|
|
3105
3209
|
|
3106
3210
|
# Private async implementation methods
|
3107
3211
|
@validate_call
|
3108
|
-
async def
|
3212
|
+
async def _get_bot_orders_count_async(
|
3109
3213
|
self,
|
3110
3214
|
id: Annotated[StrictStr, Field(description="The ID of the bot")],
|
3111
3215
|
sort_order: Annotated[
|
@@ -3114,28 +3218,10 @@ class BotsApi:
|
|
3114
3218
|
sort_by: Annotated[
|
3115
3219
|
Optional[StrictStr], Field(description="The field to sort by")
|
3116
3220
|
] = None,
|
3117
|
-
|
3118
|
-
Optional[StrictStr],
|
3119
|
-
Field(
|
3120
|
-
description="Time window for PnL. Defaults to full (all time), or use period (last X days), month, quarter, or year for values since the start of that range."
|
3121
|
-
),
|
3122
|
-
] = None,
|
3123
|
-
period: Annotated[
|
3124
|
-
Optional[Annotated[int, Field(le=365, strict=True, ge=1)]],
|
3125
|
-
Field(
|
3126
|
-
description="The number of days to return the PnL for. Only used if `window` is `period`. Default is 30."
|
3127
|
-
),
|
3128
|
-
] = None,
|
3129
|
-
user_id: Annotated[
|
3221
|
+
group_by: Annotated[
|
3130
3222
|
Optional[StrictStr],
|
3131
3223
|
Field(
|
3132
|
-
description="The
|
3133
|
-
),
|
3134
|
-
] = None,
|
3135
|
-
limit: Annotated[
|
3136
|
-
Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
|
3137
|
-
Field(
|
3138
|
-
description="The number of items to return. Defaults to None, meaning no limit."
|
3224
|
+
description="The group by period for the orders count. Defaults to day."
|
3139
3225
|
),
|
3140
3226
|
] = None,
|
3141
3227
|
_request_timeout: Union[
|
@@ -3149,10 +3235,10 @@ class BotsApi:
|
|
3149
3235
|
_content_type: Optional[StrictStr] = None,
|
3150
3236
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
3151
3237
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
3152
|
-
) -> List[
|
3153
|
-
"""Get Bot
|
3238
|
+
) -> List[OrdersCount]:
|
3239
|
+
"""Get Bot Orders Count
|
3154
3240
|
|
3155
|
-
|
3241
|
+
Get the number of orders for a bot by day, week, month, or year. The default sort is `timestamp` and the default order is `asc`.
|
3156
3242
|
|
3157
3243
|
:param id: The ID of the bot (required)
|
3158
3244
|
:type id: str
|
@@ -3160,14 +3246,8 @@ class BotsApi:
|
|
3160
3246
|
:type sort_order: str
|
3161
3247
|
:param sort_by: The field to sort by
|
3162
3248
|
:type sort_by: str
|
3163
|
-
:param
|
3164
|
-
:type
|
3165
|
-
:param period: The number of days to return the PnL for. Only used if `window` is `period`. Default is 30.
|
3166
|
-
:type period: int
|
3167
|
-
:param user_id: The ID of the user. Defaults to the authenticated user, unless user is an admin.
|
3168
|
-
:type user_id: str
|
3169
|
-
:param limit: The number of items to return. Defaults to None, meaning no limit.
|
3170
|
-
:type limit: int
|
3249
|
+
:param group_by: The group by period for the orders count. Defaults to day.
|
3250
|
+
:type group_by: str
|
3171
3251
|
:param _request_timeout: timeout setting for this request. If one
|
3172
3252
|
number provided, it will be total request
|
3173
3253
|
timeout. It can also be a pair (tuple) of
|
@@ -3190,14 +3270,11 @@ class BotsApi:
|
|
3190
3270
|
:return: Returns the result object.
|
3191
3271
|
""" # noqa: E501
|
3192
3272
|
|
3193
|
-
_param = self.
|
3273
|
+
_param = self._get_bot_orders_count_serialize(
|
3194
3274
|
id=id,
|
3195
3275
|
sort_order=sort_order,
|
3196
3276
|
sort_by=sort_by,
|
3197
|
-
|
3198
|
-
period=period,
|
3199
|
-
user_id=user_id,
|
3200
|
-
limit=limit,
|
3277
|
+
group_by=group_by,
|
3201
3278
|
_request_auth=_request_auth,
|
3202
3279
|
_content_type=_content_type,
|
3203
3280
|
_headers=_headers,
|
@@ -3205,7 +3282,7 @@ class BotsApi:
|
|
3205
3282
|
)
|
3206
3283
|
|
3207
3284
|
_response_types_map: Dict[str, Optional[str]] = {
|
3208
|
-
"200": "List[
|
3285
|
+
"200": "List[OrdersCount]",
|
3209
3286
|
}
|
3210
3287
|
response_data = await self.api_client.call_api(
|
3211
3288
|
*_param, _request_timeout=_request_timeout
|
@@ -3217,7 +3294,7 @@ class BotsApi:
|
|
3217
3294
|
).data
|
3218
3295
|
|
3219
3296
|
@validate_call
|
3220
|
-
async def
|
3297
|
+
async def _get_bot_orders_count_async_with_http_info(
|
3221
3298
|
self,
|
3222
3299
|
id: Annotated[StrictStr, Field(description="The ID of the bot")],
|
3223
3300
|
sort_order: Annotated[
|
@@ -3226,28 +3303,10 @@ class BotsApi:
|
|
3226
3303
|
sort_by: Annotated[
|
3227
3304
|
Optional[StrictStr], Field(description="The field to sort by")
|
3228
3305
|
] = None,
|
3229
|
-
|
3230
|
-
Optional[StrictStr],
|
3231
|
-
Field(
|
3232
|
-
description="Time window for PnL. Defaults to full (all time), or use period (last X days), month, quarter, or year for values since the start of that range."
|
3233
|
-
),
|
3234
|
-
] = None,
|
3235
|
-
period: Annotated[
|
3236
|
-
Optional[Annotated[int, Field(le=365, strict=True, ge=1)]],
|
3237
|
-
Field(
|
3238
|
-
description="The number of days to return the PnL for. Only used if `window` is `period`. Default is 30."
|
3239
|
-
),
|
3240
|
-
] = None,
|
3241
|
-
user_id: Annotated[
|
3306
|
+
group_by: Annotated[
|
3242
3307
|
Optional[StrictStr],
|
3243
3308
|
Field(
|
3244
|
-
description="The
|
3245
|
-
),
|
3246
|
-
] = None,
|
3247
|
-
limit: Annotated[
|
3248
|
-
Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
|
3249
|
-
Field(
|
3250
|
-
description="The number of items to return. Defaults to None, meaning no limit."
|
3309
|
+
description="The group by period for the orders count. Defaults to day."
|
3251
3310
|
),
|
3252
3311
|
] = None,
|
3253
3312
|
_request_timeout: Union[
|
@@ -3261,10 +3320,10 @@ class BotsApi:
|
|
3261
3320
|
_content_type: Optional[StrictStr] = None,
|
3262
3321
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
3263
3322
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
3264
|
-
) -> ApiResponse[List[
|
3265
|
-
"""Get Bot
|
3323
|
+
) -> ApiResponse[List[OrdersCount]]:
|
3324
|
+
"""Get Bot Orders Count
|
3266
3325
|
|
3267
|
-
|
3326
|
+
Get the number of orders for a bot by day, week, month, or year. The default sort is `timestamp` and the default order is `asc`.
|
3268
3327
|
|
3269
3328
|
:param id: The ID of the bot (required)
|
3270
3329
|
:type id: str
|
@@ -3272,14 +3331,8 @@ class BotsApi:
|
|
3272
3331
|
:type sort_order: str
|
3273
3332
|
:param sort_by: The field to sort by
|
3274
3333
|
:type sort_by: str
|
3275
|
-
:param
|
3276
|
-
:type
|
3277
|
-
:param period: The number of days to return the PnL for. Only used if `window` is `period`. Default is 30.
|
3278
|
-
:type period: int
|
3279
|
-
:param user_id: The ID of the user. Defaults to the authenticated user, unless user is an admin.
|
3280
|
-
:type user_id: str
|
3281
|
-
:param limit: The number of items to return. Defaults to None, meaning no limit.
|
3282
|
-
:type limit: int
|
3334
|
+
:param group_by: The group by period for the orders count. Defaults to day.
|
3335
|
+
:type group_by: str
|
3283
3336
|
:param _request_timeout: timeout setting for this request. If one
|
3284
3337
|
number provided, it will be total request
|
3285
3338
|
timeout. It can also be a pair (tuple) of
|
@@ -3302,14 +3355,11 @@ class BotsApi:
|
|
3302
3355
|
:return: Returns the result object.
|
3303
3356
|
""" # noqa: E501
|
3304
3357
|
|
3305
|
-
_param = self.
|
3358
|
+
_param = self._get_bot_orders_count_serialize(
|
3306
3359
|
id=id,
|
3307
3360
|
sort_order=sort_order,
|
3308
3361
|
sort_by=sort_by,
|
3309
|
-
|
3310
|
-
period=period,
|
3311
|
-
user_id=user_id,
|
3312
|
-
limit=limit,
|
3362
|
+
group_by=group_by,
|
3313
3363
|
_request_auth=_request_auth,
|
3314
3364
|
_content_type=_content_type,
|
3315
3365
|
_headers=_headers,
|
@@ -3317,7 +3367,7 @@ class BotsApi:
|
|
3317
3367
|
)
|
3318
3368
|
|
3319
3369
|
_response_types_map: Dict[str, Optional[str]] = {
|
3320
|
-
"200": "List[
|
3370
|
+
"200": "List[OrdersCount]",
|
3321
3371
|
}
|
3322
3372
|
response_data = await self.api_client.call_api(
|
3323
3373
|
*_param, _request_timeout=_request_timeout
|
@@ -3328,7 +3378,7 @@ class BotsApi:
|
|
3328
3378
|
)
|
3329
3379
|
|
3330
3380
|
@validate_call
|
3331
|
-
async def
|
3381
|
+
async def _get_bot_orders_count_async_without_preload_content(
|
3332
3382
|
self,
|
3333
3383
|
id: Annotated[StrictStr, Field(description="The ID of the bot")],
|
3334
3384
|
sort_order: Annotated[
|
@@ -3337,28 +3387,10 @@ class BotsApi:
|
|
3337
3387
|
sort_by: Annotated[
|
3338
3388
|
Optional[StrictStr], Field(description="The field to sort by")
|
3339
3389
|
] = None,
|
3340
|
-
|
3341
|
-
Optional[StrictStr],
|
3342
|
-
Field(
|
3343
|
-
description="Time window for PnL. Defaults to full (all time), or use period (last X days), month, quarter, or year for values since the start of that range."
|
3344
|
-
),
|
3345
|
-
] = None,
|
3346
|
-
period: Annotated[
|
3347
|
-
Optional[Annotated[int, Field(le=365, strict=True, ge=1)]],
|
3348
|
-
Field(
|
3349
|
-
description="The number of days to return the PnL for. Only used if `window` is `period`. Default is 30."
|
3350
|
-
),
|
3351
|
-
] = None,
|
3352
|
-
user_id: Annotated[
|
3390
|
+
group_by: Annotated[
|
3353
3391
|
Optional[StrictStr],
|
3354
3392
|
Field(
|
3355
|
-
description="The
|
3356
|
-
),
|
3357
|
-
] = None,
|
3358
|
-
limit: Annotated[
|
3359
|
-
Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
|
3360
|
-
Field(
|
3361
|
-
description="The number of items to return. Defaults to None, meaning no limit."
|
3393
|
+
description="The group by period for the orders count. Defaults to day."
|
3362
3394
|
),
|
3363
3395
|
] = None,
|
3364
3396
|
_request_timeout: Union[
|
@@ -3373,9 +3405,9 @@ class BotsApi:
|
|
3373
3405
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
3374
3406
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
3375
3407
|
) -> RESTResponseType:
|
3376
|
-
"""Get Bot
|
3408
|
+
"""Get Bot Orders Count
|
3377
3409
|
|
3378
|
-
|
3410
|
+
Get the number of orders for a bot by day, week, month, or year. The default sort is `timestamp` and the default order is `asc`.
|
3379
3411
|
|
3380
3412
|
:param id: The ID of the bot (required)
|
3381
3413
|
:type id: str
|
@@ -3383,14 +3415,8 @@ class BotsApi:
|
|
3383
3415
|
:type sort_order: str
|
3384
3416
|
:param sort_by: The field to sort by
|
3385
3417
|
:type sort_by: str
|
3386
|
-
:param
|
3387
|
-
:type
|
3388
|
-
:param period: The number of days to return the PnL for. Only used if `window` is `period`. Default is 30.
|
3389
|
-
:type period: int
|
3390
|
-
:param user_id: The ID of the user. Defaults to the authenticated user, unless user is an admin.
|
3391
|
-
:type user_id: str
|
3392
|
-
:param limit: The number of items to return. Defaults to None, meaning no limit.
|
3393
|
-
:type limit: int
|
3418
|
+
:param group_by: The group by period for the orders count. Defaults to day.
|
3419
|
+
:type group_by: str
|
3394
3420
|
:param _request_timeout: timeout setting for this request. If one
|
3395
3421
|
number provided, it will be total request
|
3396
3422
|
timeout. It can also be a pair (tuple) of
|
@@ -3413,14 +3439,11 @@ class BotsApi:
|
|
3413
3439
|
:return: Returns the result object.
|
3414
3440
|
""" # noqa: E501
|
3415
3441
|
|
3416
|
-
_param = self.
|
3442
|
+
_param = self._get_bot_orders_count_serialize(
|
3417
3443
|
id=id,
|
3418
3444
|
sort_order=sort_order,
|
3419
3445
|
sort_by=sort_by,
|
3420
|
-
|
3421
|
-
period=period,
|
3422
|
-
user_id=user_id,
|
3423
|
-
limit=limit,
|
3446
|
+
group_by=group_by,
|
3424
3447
|
_request_auth=_request_auth,
|
3425
3448
|
_content_type=_content_type,
|
3426
3449
|
_headers=_headers,
|
@@ -3428,7 +3451,7 @@ class BotsApi:
|
|
3428
3451
|
)
|
3429
3452
|
|
3430
3453
|
_response_types_map: Dict[str, Optional[str]] = {
|
3431
|
-
"200": "List[
|
3454
|
+
"200": "List[OrdersCount]",
|
3432
3455
|
}
|
3433
3456
|
response_data = await self.api_client.call_api(
|
3434
3457
|
*_param, _request_timeout=_request_timeout
|
@@ -3437,7 +3460,7 @@ class BotsApi:
|
|
3437
3460
|
|
3438
3461
|
# Private sync implementation methods
|
3439
3462
|
@validate_call
|
3440
|
-
def
|
3463
|
+
def _get_bot_orders_count_sync(
|
3441
3464
|
self,
|
3442
3465
|
id: Annotated[StrictStr, Field(description="The ID of the bot")],
|
3443
3466
|
sort_order: Annotated[
|
@@ -3446,28 +3469,10 @@ class BotsApi:
|
|
3446
3469
|
sort_by: Annotated[
|
3447
3470
|
Optional[StrictStr], Field(description="The field to sort by")
|
3448
3471
|
] = None,
|
3449
|
-
|
3450
|
-
Optional[StrictStr],
|
3451
|
-
Field(
|
3452
|
-
description="Time window for PnL. Defaults to full (all time), or use period (last X days), month, quarter, or year for values since the start of that range."
|
3453
|
-
),
|
3454
|
-
] = None,
|
3455
|
-
period: Annotated[
|
3456
|
-
Optional[Annotated[int, Field(le=365, strict=True, ge=1)]],
|
3457
|
-
Field(
|
3458
|
-
description="The number of days to return the PnL for. Only used if `window` is `period`. Default is 30."
|
3459
|
-
),
|
3460
|
-
] = None,
|
3461
|
-
user_id: Annotated[
|
3472
|
+
group_by: Annotated[
|
3462
3473
|
Optional[StrictStr],
|
3463
3474
|
Field(
|
3464
|
-
description="The
|
3465
|
-
),
|
3466
|
-
] = None,
|
3467
|
-
limit: Annotated[
|
3468
|
-
Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
|
3469
|
-
Field(
|
3470
|
-
description="The number of items to return. Defaults to None, meaning no limit."
|
3475
|
+
description="The group by period for the orders count. Defaults to day."
|
3471
3476
|
),
|
3472
3477
|
] = None,
|
3473
3478
|
_request_timeout: Union[
|
@@ -3481,16 +3486,13 @@ class BotsApi:
|
|
3481
3486
|
_content_type: Optional[StrictStr] = None,
|
3482
3487
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
3483
3488
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
3484
|
-
) -> List[
|
3485
|
-
"""Synchronous version of
|
3486
|
-
return async_to_sync(self.
|
3489
|
+
) -> List[OrdersCount]:
|
3490
|
+
"""Synchronous version of get_bot_orders_count"""
|
3491
|
+
return async_to_sync(self._get_bot_orders_count_async)(
|
3487
3492
|
id=id,
|
3488
3493
|
sort_order=sort_order,
|
3489
3494
|
sort_by=sort_by,
|
3490
|
-
|
3491
|
-
period=period,
|
3492
|
-
user_id=user_id,
|
3493
|
-
limit=limit,
|
3495
|
+
group_by=group_by,
|
3494
3496
|
_request_timeout=_request_timeout,
|
3495
3497
|
_request_auth=_request_auth,
|
3496
3498
|
_content_type=_content_type,
|
@@ -3499,7 +3501,7 @@ class BotsApi:
|
|
3499
3501
|
)
|
3500
3502
|
|
3501
3503
|
@validate_call
|
3502
|
-
def
|
3504
|
+
def _get_bot_orders_count_sync_with_http_info(
|
3503
3505
|
self,
|
3504
3506
|
id: Annotated[StrictStr, Field(description="The ID of the bot")],
|
3505
3507
|
sort_order: Annotated[
|
@@ -3508,28 +3510,51 @@ class BotsApi:
|
|
3508
3510
|
sort_by: Annotated[
|
3509
3511
|
Optional[StrictStr], Field(description="The field to sort by")
|
3510
3512
|
] = None,
|
3511
|
-
|
3513
|
+
group_by: Annotated[
|
3512
3514
|
Optional[StrictStr],
|
3513
3515
|
Field(
|
3514
|
-
description="
|
3515
|
-
),
|
3516
|
-
] = None,
|
3517
|
-
period: Annotated[
|
3518
|
-
Optional[Annotated[int, Field(le=365, strict=True, ge=1)]],
|
3519
|
-
Field(
|
3520
|
-
description="The number of days to return the PnL for. Only used if `window` is `period`. Default is 30."
|
3516
|
+
description="The group by period for the orders count. Defaults to day."
|
3521
3517
|
),
|
3522
3518
|
] = None,
|
3523
|
-
|
3524
|
-
|
3525
|
-
Field(
|
3526
|
-
|
3527
|
-
|
3519
|
+
_request_timeout: Union[
|
3520
|
+
None,
|
3521
|
+
Annotated[StrictFloat, Field(gt=0)],
|
3522
|
+
Tuple[
|
3523
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
3524
|
+
],
|
3528
3525
|
] = None,
|
3529
|
-
|
3530
|
-
|
3526
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
3527
|
+
_content_type: Optional[StrictStr] = None,
|
3528
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
3529
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
3530
|
+
) -> ApiResponse[List[OrdersCount]]:
|
3531
|
+
"""Synchronous version of get_bot_orders_count_with_http_info"""
|
3532
|
+
return async_to_sync(self._get_bot_orders_count_async_with_http_info)(
|
3533
|
+
id=id,
|
3534
|
+
sort_order=sort_order,
|
3535
|
+
sort_by=sort_by,
|
3536
|
+
group_by=group_by,
|
3537
|
+
_request_timeout=_request_timeout,
|
3538
|
+
_request_auth=_request_auth,
|
3539
|
+
_content_type=_content_type,
|
3540
|
+
_headers=_headers,
|
3541
|
+
_host_index=_host_index,
|
3542
|
+
)
|
3543
|
+
|
3544
|
+
@validate_call
|
3545
|
+
def _get_bot_orders_count_sync_without_preload_content(
|
3546
|
+
self,
|
3547
|
+
id: Annotated[StrictStr, Field(description="The ID of the bot")],
|
3548
|
+
sort_order: Annotated[
|
3549
|
+
Optional[StrictStr], Field(description="The order to sort by")
|
3550
|
+
] = None,
|
3551
|
+
sort_by: Annotated[
|
3552
|
+
Optional[StrictStr], Field(description="The field to sort by")
|
3553
|
+
] = None,
|
3554
|
+
group_by: Annotated[
|
3555
|
+
Optional[StrictStr],
|
3531
3556
|
Field(
|
3532
|
-
description="The
|
3557
|
+
description="The group by period for the orders count. Defaults to day."
|
3533
3558
|
),
|
3534
3559
|
] = None,
|
3535
3560
|
_request_timeout: Union[
|
@@ -3543,16 +3568,13 @@ class BotsApi:
|
|
3543
3568
|
_content_type: Optional[StrictStr] = None,
|
3544
3569
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
3545
3570
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
3546
|
-
) ->
|
3547
|
-
"""Synchronous version of
|
3548
|
-
return async_to_sync(self.
|
3571
|
+
) -> RESTResponseType:
|
3572
|
+
"""Synchronous version of get_bot_orders_count_without_preload_content"""
|
3573
|
+
return async_to_sync(self._get_bot_orders_count_async_without_preload_content)(
|
3549
3574
|
id=id,
|
3550
3575
|
sort_order=sort_order,
|
3551
3576
|
sort_by=sort_by,
|
3552
|
-
|
3553
|
-
period=period,
|
3554
|
-
user_id=user_id,
|
3555
|
-
limit=limit,
|
3577
|
+
group_by=group_by,
|
3556
3578
|
_request_timeout=_request_timeout,
|
3557
3579
|
_request_auth=_request_auth,
|
3558
3580
|
_content_type=_content_type,
|
@@ -3560,8 +3582,77 @@ class BotsApi:
|
|
3560
3582
|
_host_index=_host_index,
|
3561
3583
|
)
|
3562
3584
|
|
3585
|
+
def _get_bot_orders_count_serialize(
|
3586
|
+
self,
|
3587
|
+
id,
|
3588
|
+
sort_order,
|
3589
|
+
sort_by,
|
3590
|
+
group_by,
|
3591
|
+
_request_auth,
|
3592
|
+
_content_type,
|
3593
|
+
_headers,
|
3594
|
+
_host_index,
|
3595
|
+
) -> RequestSerialized:
|
3596
|
+
|
3597
|
+
_host = None
|
3598
|
+
|
3599
|
+
_collection_formats: Dict[str, str] = {}
|
3600
|
+
|
3601
|
+
_path_params: Dict[str, str] = {}
|
3602
|
+
_query_params: List[Tuple[str, str]] = []
|
3603
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
3604
|
+
_form_params: List[Tuple[str, str]] = []
|
3605
|
+
_files: Dict[
|
3606
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
3607
|
+
] = {}
|
3608
|
+
_body_params: Optional[bytes] = None
|
3609
|
+
|
3610
|
+
# process the path parameters
|
3611
|
+
if id is not None:
|
3612
|
+
_path_params["id"] = id
|
3613
|
+
# process the query parameters
|
3614
|
+
if sort_order is not None:
|
3615
|
+
|
3616
|
+
_query_params.append(("sort_order", sort_order))
|
3617
|
+
|
3618
|
+
if sort_by is not None:
|
3619
|
+
|
3620
|
+
_query_params.append(("sort_by", sort_by))
|
3621
|
+
|
3622
|
+
if group_by is not None:
|
3623
|
+
|
3624
|
+
_query_params.append(("group_by", group_by))
|
3625
|
+
|
3626
|
+
# process the header parameters
|
3627
|
+
# process the form parameters
|
3628
|
+
# process the body parameter
|
3629
|
+
|
3630
|
+
# set the HTTP header `Accept`
|
3631
|
+
if "Accept" not in _header_params:
|
3632
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
3633
|
+
["application/json"]
|
3634
|
+
)
|
3635
|
+
|
3636
|
+
# authentication setting
|
3637
|
+
_auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]
|
3638
|
+
|
3639
|
+
return self.api_client.param_serialize(
|
3640
|
+
method="GET",
|
3641
|
+
resource_path="/bots/{id}/orders/count",
|
3642
|
+
path_params=_path_params,
|
3643
|
+
query_params=_query_params,
|
3644
|
+
header_params=_header_params,
|
3645
|
+
body=_body_params,
|
3646
|
+
post_params=_form_params,
|
3647
|
+
files=_files,
|
3648
|
+
auth_settings=_auth_settings,
|
3649
|
+
collection_formats=_collection_formats,
|
3650
|
+
_host=_host,
|
3651
|
+
_request_auth=_request_auth,
|
3652
|
+
)
|
3653
|
+
|
3563
3654
|
@validate_call
|
3564
|
-
def
|
3655
|
+
def get_bot_orders_pnl(
|
3565
3656
|
self,
|
3566
3657
|
id: Annotated[StrictStr, Field(description="The ID of the bot")],
|
3567
3658
|
sort_order: Annotated[
|
@@ -3605,16 +3696,1439 @@ class BotsApi:
|
|
3605
3696
|
_content_type: Optional[StrictStr] = None,
|
3606
3697
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
3607
3698
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
3608
|
-
) ->
|
3609
|
-
"""
|
3610
|
-
|
3611
|
-
|
3612
|
-
|
3613
|
-
|
3614
|
-
|
3615
|
-
|
3616
|
-
|
3617
|
-
|
3699
|
+
) -> List[PnL]:
|
3700
|
+
"""Get Bot Pnl"""
|
3701
|
+
if self.is_sync:
|
3702
|
+
return self._get_bot_orders_pnl_sync(
|
3703
|
+
id=id,
|
3704
|
+
sort_order=sort_order,
|
3705
|
+
sort_by=sort_by,
|
3706
|
+
window=window,
|
3707
|
+
period=period,
|
3708
|
+
user_id=user_id,
|
3709
|
+
limit=limit,
|
3710
|
+
_request_timeout=_request_timeout,
|
3711
|
+
_request_auth=_request_auth,
|
3712
|
+
_content_type=_content_type,
|
3713
|
+
_headers=_headers,
|
3714
|
+
_host_index=_host_index,
|
3715
|
+
)
|
3716
|
+
|
3717
|
+
else:
|
3718
|
+
return self._get_bot_orders_pnl_async(
|
3719
|
+
id=id,
|
3720
|
+
sort_order=sort_order,
|
3721
|
+
sort_by=sort_by,
|
3722
|
+
window=window,
|
3723
|
+
period=period,
|
3724
|
+
user_id=user_id,
|
3725
|
+
limit=limit,
|
3726
|
+
_request_timeout=_request_timeout,
|
3727
|
+
_request_auth=_request_auth,
|
3728
|
+
_content_type=_content_type,
|
3729
|
+
_headers=_headers,
|
3730
|
+
_host_index=_host_index,
|
3731
|
+
)
|
3732
|
+
|
3733
|
+
@validate_call
|
3734
|
+
def get_bot_orders_pnl_with_http_info(
|
3735
|
+
self,
|
3736
|
+
id: Annotated[StrictStr, Field(description="The ID of the bot")],
|
3737
|
+
sort_order: Annotated[
|
3738
|
+
Optional[StrictStr], Field(description="The order to sort by")
|
3739
|
+
] = None,
|
3740
|
+
sort_by: Annotated[
|
3741
|
+
Optional[StrictStr], Field(description="The field to sort by")
|
3742
|
+
] = None,
|
3743
|
+
window: Annotated[
|
3744
|
+
Optional[StrictStr],
|
3745
|
+
Field(
|
3746
|
+
description="Time window for PnL. Defaults to full (all time), or use period (last X days), month, quarter, or year for values since the start of that range."
|
3747
|
+
),
|
3748
|
+
] = None,
|
3749
|
+
period: Annotated[
|
3750
|
+
Optional[Annotated[int, Field(le=365, strict=True, ge=1)]],
|
3751
|
+
Field(
|
3752
|
+
description="The number of days to return the PnL for. Only used if `window` is `period`. Default is 30."
|
3753
|
+
),
|
3754
|
+
] = None,
|
3755
|
+
user_id: Annotated[
|
3756
|
+
Optional[StrictStr],
|
3757
|
+
Field(
|
3758
|
+
description="The ID of the user. Defaults to the authenticated user, unless user is an admin."
|
3759
|
+
),
|
3760
|
+
] = None,
|
3761
|
+
limit: Annotated[
|
3762
|
+
Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
|
3763
|
+
Field(
|
3764
|
+
description="The number of items to return. Defaults to None, meaning no limit."
|
3765
|
+
),
|
3766
|
+
] = None,
|
3767
|
+
_request_timeout: Union[
|
3768
|
+
None,
|
3769
|
+
Annotated[StrictFloat, Field(gt=0)],
|
3770
|
+
Tuple[
|
3771
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
3772
|
+
],
|
3773
|
+
] = None,
|
3774
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
3775
|
+
_content_type: Optional[StrictStr] = None,
|
3776
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
3777
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
3778
|
+
) -> ApiResponse[List[PnL]]:
|
3779
|
+
"""Get Bot Pnl with HTTP info"""
|
3780
|
+
if self.is_sync:
|
3781
|
+
return self._get_bot_orders_pnl_sync_with_http_info(
|
3782
|
+
id=id,
|
3783
|
+
sort_order=sort_order,
|
3784
|
+
sort_by=sort_by,
|
3785
|
+
window=window,
|
3786
|
+
period=period,
|
3787
|
+
user_id=user_id,
|
3788
|
+
limit=limit,
|
3789
|
+
_request_timeout=_request_timeout,
|
3790
|
+
_request_auth=_request_auth,
|
3791
|
+
_content_type=_content_type,
|
3792
|
+
_headers=_headers,
|
3793
|
+
_host_index=_host_index,
|
3794
|
+
)
|
3795
|
+
|
3796
|
+
else:
|
3797
|
+
return self._get_bot_orders_pnl_async_with_http_info(
|
3798
|
+
id=id,
|
3799
|
+
sort_order=sort_order,
|
3800
|
+
sort_by=sort_by,
|
3801
|
+
window=window,
|
3802
|
+
period=period,
|
3803
|
+
user_id=user_id,
|
3804
|
+
limit=limit,
|
3805
|
+
_request_timeout=_request_timeout,
|
3806
|
+
_request_auth=_request_auth,
|
3807
|
+
_content_type=_content_type,
|
3808
|
+
_headers=_headers,
|
3809
|
+
_host_index=_host_index,
|
3810
|
+
)
|
3811
|
+
|
3812
|
+
@validate_call
|
3813
|
+
def get_bot_orders_pnl_without_preload_content(
|
3814
|
+
self,
|
3815
|
+
id: Annotated[StrictStr, Field(description="The ID of the bot")],
|
3816
|
+
sort_order: Annotated[
|
3817
|
+
Optional[StrictStr], Field(description="The order to sort by")
|
3818
|
+
] = None,
|
3819
|
+
sort_by: Annotated[
|
3820
|
+
Optional[StrictStr], Field(description="The field to sort by")
|
3821
|
+
] = None,
|
3822
|
+
window: Annotated[
|
3823
|
+
Optional[StrictStr],
|
3824
|
+
Field(
|
3825
|
+
description="Time window for PnL. Defaults to full (all time), or use period (last X days), month, quarter, or year for values since the start of that range."
|
3826
|
+
),
|
3827
|
+
] = None,
|
3828
|
+
period: Annotated[
|
3829
|
+
Optional[Annotated[int, Field(le=365, strict=True, ge=1)]],
|
3830
|
+
Field(
|
3831
|
+
description="The number of days to return the PnL for. Only used if `window` is `period`. Default is 30."
|
3832
|
+
),
|
3833
|
+
] = None,
|
3834
|
+
user_id: Annotated[
|
3835
|
+
Optional[StrictStr],
|
3836
|
+
Field(
|
3837
|
+
description="The ID of the user. Defaults to the authenticated user, unless user is an admin."
|
3838
|
+
),
|
3839
|
+
] = None,
|
3840
|
+
limit: Annotated[
|
3841
|
+
Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
|
3842
|
+
Field(
|
3843
|
+
description="The number of items to return. Defaults to None, meaning no limit."
|
3844
|
+
),
|
3845
|
+
] = None,
|
3846
|
+
_request_timeout: Union[
|
3847
|
+
None,
|
3848
|
+
Annotated[StrictFloat, Field(gt=0)],
|
3849
|
+
Tuple[
|
3850
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
3851
|
+
],
|
3852
|
+
] = None,
|
3853
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
3854
|
+
_content_type: Optional[StrictStr] = None,
|
3855
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
3856
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
3857
|
+
) -> RESTResponseType:
|
3858
|
+
"""Get Bot Pnl without preloading content"""
|
3859
|
+
if self.is_sync:
|
3860
|
+
return self._get_bot_orders_pnl_sync_without_preload_content(
|
3861
|
+
id=id,
|
3862
|
+
sort_order=sort_order,
|
3863
|
+
sort_by=sort_by,
|
3864
|
+
window=window,
|
3865
|
+
period=period,
|
3866
|
+
user_id=user_id,
|
3867
|
+
limit=limit,
|
3868
|
+
_request_timeout=_request_timeout,
|
3869
|
+
_request_auth=_request_auth,
|
3870
|
+
_content_type=_content_type,
|
3871
|
+
_headers=_headers,
|
3872
|
+
_host_index=_host_index,
|
3873
|
+
)
|
3874
|
+
|
3875
|
+
else:
|
3876
|
+
return self._get_bot_orders_pnl_async_without_preload_content(
|
3877
|
+
id=id,
|
3878
|
+
sort_order=sort_order,
|
3879
|
+
sort_by=sort_by,
|
3880
|
+
window=window,
|
3881
|
+
period=period,
|
3882
|
+
user_id=user_id,
|
3883
|
+
limit=limit,
|
3884
|
+
_request_timeout=_request_timeout,
|
3885
|
+
_request_auth=_request_auth,
|
3886
|
+
_content_type=_content_type,
|
3887
|
+
_headers=_headers,
|
3888
|
+
_host_index=_host_index,
|
3889
|
+
)
|
3890
|
+
|
3891
|
+
# Private async implementation methods
|
3892
|
+
@validate_call
|
3893
|
+
async def _get_bot_orders_pnl_async(
|
3894
|
+
self,
|
3895
|
+
id: Annotated[StrictStr, Field(description="The ID of the bot")],
|
3896
|
+
sort_order: Annotated[
|
3897
|
+
Optional[StrictStr], Field(description="The order to sort by")
|
3898
|
+
] = None,
|
3899
|
+
sort_by: Annotated[
|
3900
|
+
Optional[StrictStr], Field(description="The field to sort by")
|
3901
|
+
] = None,
|
3902
|
+
window: Annotated[
|
3903
|
+
Optional[StrictStr],
|
3904
|
+
Field(
|
3905
|
+
description="Time window for PnL. Defaults to full (all time), or use period (last X days), month, quarter, or year for values since the start of that range."
|
3906
|
+
),
|
3907
|
+
] = None,
|
3908
|
+
period: Annotated[
|
3909
|
+
Optional[Annotated[int, Field(le=365, strict=True, ge=1)]],
|
3910
|
+
Field(
|
3911
|
+
description="The number of days to return the PnL for. Only used if `window` is `period`. Default is 30."
|
3912
|
+
),
|
3913
|
+
] = None,
|
3914
|
+
user_id: Annotated[
|
3915
|
+
Optional[StrictStr],
|
3916
|
+
Field(
|
3917
|
+
description="The ID of the user. Defaults to the authenticated user, unless user is an admin."
|
3918
|
+
),
|
3919
|
+
] = None,
|
3920
|
+
limit: Annotated[
|
3921
|
+
Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
|
3922
|
+
Field(
|
3923
|
+
description="The number of items to return. Defaults to None, meaning no limit."
|
3924
|
+
),
|
3925
|
+
] = None,
|
3926
|
+
_request_timeout: Union[
|
3927
|
+
None,
|
3928
|
+
Annotated[StrictFloat, Field(gt=0)],
|
3929
|
+
Tuple[
|
3930
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
3931
|
+
],
|
3932
|
+
] = None,
|
3933
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
3934
|
+
_content_type: Optional[StrictStr] = None,
|
3935
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
3936
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
3937
|
+
) -> List[PnL]:
|
3938
|
+
"""Get Bot Pnl
|
3939
|
+
|
3940
|
+
Returns a list of PnLs for a bot over time, sorted by `timestamp` ascending by default. If more than 1000 points exist, PnLs are grouped by day. To get the latest cumulative PnL in a time window, use `sort_by=timestamp`, `sort_order=desc`, and `limit=1`.
|
3941
|
+
|
3942
|
+
:param id: The ID of the bot (required)
|
3943
|
+
:type id: str
|
3944
|
+
:param sort_order: The order to sort by
|
3945
|
+
:type sort_order: str
|
3946
|
+
:param sort_by: The field to sort by
|
3947
|
+
:type sort_by: str
|
3948
|
+
:param window: Time window for PnL. Defaults to full (all time), or use period (last X days), month, quarter, or year for values since the start of that range.
|
3949
|
+
:type window: str
|
3950
|
+
:param period: The number of days to return the PnL for. Only used if `window` is `period`. Default is 30.
|
3951
|
+
:type period: int
|
3952
|
+
:param user_id: The ID of the user. Defaults to the authenticated user, unless user is an admin.
|
3953
|
+
:type user_id: str
|
3954
|
+
:param limit: The number of items to return. Defaults to None, meaning no limit.
|
3955
|
+
:type limit: int
|
3956
|
+
:param _request_timeout: timeout setting for this request. If one
|
3957
|
+
number provided, it will be total request
|
3958
|
+
timeout. It can also be a pair (tuple) of
|
3959
|
+
(connection, read) timeouts.
|
3960
|
+
:type _request_timeout: int, tuple(int, int), optional
|
3961
|
+
:param _request_auth: set to override the auth_settings for an a single
|
3962
|
+
request; this effectively ignores the
|
3963
|
+
authentication in the spec for a single request.
|
3964
|
+
:type _request_auth: dict, optional
|
3965
|
+
:param _content_type: force content-type for the request.
|
3966
|
+
:type _content_type: str, Optional
|
3967
|
+
:param _headers: set to override the headers for a single
|
3968
|
+
request; this effectively ignores the headers
|
3969
|
+
in the spec for a single request.
|
3970
|
+
:type _headers: dict, optional
|
3971
|
+
:param _host_index: set to override the host_index for a single
|
3972
|
+
request; this effectively ignores the host_index
|
3973
|
+
in the spec for a single request.
|
3974
|
+
:type _host_index: int, optional
|
3975
|
+
:return: Returns the result object.
|
3976
|
+
""" # noqa: E501
|
3977
|
+
|
3978
|
+
_param = self._get_bot_orders_pnl_serialize(
|
3979
|
+
id=id,
|
3980
|
+
sort_order=sort_order,
|
3981
|
+
sort_by=sort_by,
|
3982
|
+
window=window,
|
3983
|
+
period=period,
|
3984
|
+
user_id=user_id,
|
3985
|
+
limit=limit,
|
3986
|
+
_request_auth=_request_auth,
|
3987
|
+
_content_type=_content_type,
|
3988
|
+
_headers=_headers,
|
3989
|
+
_host_index=_host_index,
|
3990
|
+
)
|
3991
|
+
|
3992
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
3993
|
+
"200": "List[PnL]",
|
3994
|
+
}
|
3995
|
+
response_data = await self.api_client.call_api(
|
3996
|
+
*_param, _request_timeout=_request_timeout
|
3997
|
+
)
|
3998
|
+
await response_data.read()
|
3999
|
+
return self.api_client.response_deserialize(
|
4000
|
+
response_data=response_data,
|
4001
|
+
response_types_map=_response_types_map,
|
4002
|
+
).data
|
4003
|
+
|
4004
|
+
@validate_call
|
4005
|
+
async def _get_bot_orders_pnl_async_with_http_info(
|
4006
|
+
self,
|
4007
|
+
id: Annotated[StrictStr, Field(description="The ID of the bot")],
|
4008
|
+
sort_order: Annotated[
|
4009
|
+
Optional[StrictStr], Field(description="The order to sort by")
|
4010
|
+
] = None,
|
4011
|
+
sort_by: Annotated[
|
4012
|
+
Optional[StrictStr], Field(description="The field to sort by")
|
4013
|
+
] = None,
|
4014
|
+
window: Annotated[
|
4015
|
+
Optional[StrictStr],
|
4016
|
+
Field(
|
4017
|
+
description="Time window for PnL. Defaults to full (all time), or use period (last X days), month, quarter, or year for values since the start of that range."
|
4018
|
+
),
|
4019
|
+
] = None,
|
4020
|
+
period: Annotated[
|
4021
|
+
Optional[Annotated[int, Field(le=365, strict=True, ge=1)]],
|
4022
|
+
Field(
|
4023
|
+
description="The number of days to return the PnL for. Only used if `window` is `period`. Default is 30."
|
4024
|
+
),
|
4025
|
+
] = None,
|
4026
|
+
user_id: Annotated[
|
4027
|
+
Optional[StrictStr],
|
4028
|
+
Field(
|
4029
|
+
description="The ID of the user. Defaults to the authenticated user, unless user is an admin."
|
4030
|
+
),
|
4031
|
+
] = None,
|
4032
|
+
limit: Annotated[
|
4033
|
+
Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
|
4034
|
+
Field(
|
4035
|
+
description="The number of items to return. Defaults to None, meaning no limit."
|
4036
|
+
),
|
4037
|
+
] = None,
|
4038
|
+
_request_timeout: Union[
|
4039
|
+
None,
|
4040
|
+
Annotated[StrictFloat, Field(gt=0)],
|
4041
|
+
Tuple[
|
4042
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
4043
|
+
],
|
4044
|
+
] = None,
|
4045
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
4046
|
+
_content_type: Optional[StrictStr] = None,
|
4047
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
4048
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
4049
|
+
) -> ApiResponse[List[PnL]]:
|
4050
|
+
"""Get Bot Pnl
|
4051
|
+
|
4052
|
+
Returns a list of PnLs for a bot over time, sorted by `timestamp` ascending by default. If more than 1000 points exist, PnLs are grouped by day. To get the latest cumulative PnL in a time window, use `sort_by=timestamp`, `sort_order=desc`, and `limit=1`.
|
4053
|
+
|
4054
|
+
:param id: The ID of the bot (required)
|
4055
|
+
:type id: str
|
4056
|
+
:param sort_order: The order to sort by
|
4057
|
+
:type sort_order: str
|
4058
|
+
:param sort_by: The field to sort by
|
4059
|
+
:type sort_by: str
|
4060
|
+
:param window: Time window for PnL. Defaults to full (all time), or use period (last X days), month, quarter, or year for values since the start of that range.
|
4061
|
+
:type window: str
|
4062
|
+
:param period: The number of days to return the PnL for. Only used if `window` is `period`. Default is 30.
|
4063
|
+
:type period: int
|
4064
|
+
:param user_id: The ID of the user. Defaults to the authenticated user, unless user is an admin.
|
4065
|
+
:type user_id: str
|
4066
|
+
:param limit: The number of items to return. Defaults to None, meaning no limit.
|
4067
|
+
:type limit: int
|
4068
|
+
:param _request_timeout: timeout setting for this request. If one
|
4069
|
+
number provided, it will be total request
|
4070
|
+
timeout. It can also be a pair (tuple) of
|
4071
|
+
(connection, read) timeouts.
|
4072
|
+
:type _request_timeout: int, tuple(int, int), optional
|
4073
|
+
:param _request_auth: set to override the auth_settings for an a single
|
4074
|
+
request; this effectively ignores the
|
4075
|
+
authentication in the spec for a single request.
|
4076
|
+
:type _request_auth: dict, optional
|
4077
|
+
:param _content_type: force content-type for the request.
|
4078
|
+
:type _content_type: str, Optional
|
4079
|
+
:param _headers: set to override the headers for a single
|
4080
|
+
request; this effectively ignores the headers
|
4081
|
+
in the spec for a single request.
|
4082
|
+
:type _headers: dict, optional
|
4083
|
+
:param _host_index: set to override the host_index for a single
|
4084
|
+
request; this effectively ignores the host_index
|
4085
|
+
in the spec for a single request.
|
4086
|
+
:type _host_index: int, optional
|
4087
|
+
:return: Returns the result object.
|
4088
|
+
""" # noqa: E501
|
4089
|
+
|
4090
|
+
_param = self._get_bot_orders_pnl_serialize(
|
4091
|
+
id=id,
|
4092
|
+
sort_order=sort_order,
|
4093
|
+
sort_by=sort_by,
|
4094
|
+
window=window,
|
4095
|
+
period=period,
|
4096
|
+
user_id=user_id,
|
4097
|
+
limit=limit,
|
4098
|
+
_request_auth=_request_auth,
|
4099
|
+
_content_type=_content_type,
|
4100
|
+
_headers=_headers,
|
4101
|
+
_host_index=_host_index,
|
4102
|
+
)
|
4103
|
+
|
4104
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
4105
|
+
"200": "List[PnL]",
|
4106
|
+
}
|
4107
|
+
response_data = await self.api_client.call_api(
|
4108
|
+
*_param, _request_timeout=_request_timeout
|
4109
|
+
)
|
4110
|
+
await response_data.read()
|
4111
|
+
return self.api_client.response_deserialize(
|
4112
|
+
response_data=response_data, response_types_map=_response_types_map
|
4113
|
+
)
|
4114
|
+
|
4115
|
+
@validate_call
|
4116
|
+
async def _get_bot_orders_pnl_async_without_preload_content(
|
4117
|
+
self,
|
4118
|
+
id: Annotated[StrictStr, Field(description="The ID of the bot")],
|
4119
|
+
sort_order: Annotated[
|
4120
|
+
Optional[StrictStr], Field(description="The order to sort by")
|
4121
|
+
] = None,
|
4122
|
+
sort_by: Annotated[
|
4123
|
+
Optional[StrictStr], Field(description="The field to sort by")
|
4124
|
+
] = None,
|
4125
|
+
window: Annotated[
|
4126
|
+
Optional[StrictStr],
|
4127
|
+
Field(
|
4128
|
+
description="Time window for PnL. Defaults to full (all time), or use period (last X days), month, quarter, or year for values since the start of that range."
|
4129
|
+
),
|
4130
|
+
] = None,
|
4131
|
+
period: Annotated[
|
4132
|
+
Optional[Annotated[int, Field(le=365, strict=True, ge=1)]],
|
4133
|
+
Field(
|
4134
|
+
description="The number of days to return the PnL for. Only used if `window` is `period`. Default is 30."
|
4135
|
+
),
|
4136
|
+
] = None,
|
4137
|
+
user_id: Annotated[
|
4138
|
+
Optional[StrictStr],
|
4139
|
+
Field(
|
4140
|
+
description="The ID of the user. Defaults to the authenticated user, unless user is an admin."
|
4141
|
+
),
|
4142
|
+
] = None,
|
4143
|
+
limit: Annotated[
|
4144
|
+
Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
|
4145
|
+
Field(
|
4146
|
+
description="The number of items to return. Defaults to None, meaning no limit."
|
4147
|
+
),
|
4148
|
+
] = None,
|
4149
|
+
_request_timeout: Union[
|
4150
|
+
None,
|
4151
|
+
Annotated[StrictFloat, Field(gt=0)],
|
4152
|
+
Tuple[
|
4153
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
4154
|
+
],
|
4155
|
+
] = None,
|
4156
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
4157
|
+
_content_type: Optional[StrictStr] = None,
|
4158
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
4159
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
4160
|
+
) -> RESTResponseType:
|
4161
|
+
"""Get Bot Pnl
|
4162
|
+
|
4163
|
+
Returns a list of PnLs for a bot over time, sorted by `timestamp` ascending by default. If more than 1000 points exist, PnLs are grouped by day. To get the latest cumulative PnL in a time window, use `sort_by=timestamp`, `sort_order=desc`, and `limit=1`.
|
4164
|
+
|
4165
|
+
:param id: The ID of the bot (required)
|
4166
|
+
:type id: str
|
4167
|
+
:param sort_order: The order to sort by
|
4168
|
+
:type sort_order: str
|
4169
|
+
:param sort_by: The field to sort by
|
4170
|
+
:type sort_by: str
|
4171
|
+
:param window: Time window for PnL. Defaults to full (all time), or use period (last X days), month, quarter, or year for values since the start of that range.
|
4172
|
+
:type window: str
|
4173
|
+
:param period: The number of days to return the PnL for. Only used if `window` is `period`. Default is 30.
|
4174
|
+
:type period: int
|
4175
|
+
:param user_id: The ID of the user. Defaults to the authenticated user, unless user is an admin.
|
4176
|
+
:type user_id: str
|
4177
|
+
:param limit: The number of items to return. Defaults to None, meaning no limit.
|
4178
|
+
:type limit: int
|
4179
|
+
:param _request_timeout: timeout setting for this request. If one
|
4180
|
+
number provided, it will be total request
|
4181
|
+
timeout. It can also be a pair (tuple) of
|
4182
|
+
(connection, read) timeouts.
|
4183
|
+
:type _request_timeout: int, tuple(int, int), optional
|
4184
|
+
:param _request_auth: set to override the auth_settings for an a single
|
4185
|
+
request; this effectively ignores the
|
4186
|
+
authentication in the spec for a single request.
|
4187
|
+
:type _request_auth: dict, optional
|
4188
|
+
:param _content_type: force content-type for the request.
|
4189
|
+
:type _content_type: str, Optional
|
4190
|
+
:param _headers: set to override the headers for a single
|
4191
|
+
request; this effectively ignores the headers
|
4192
|
+
in the spec for a single request.
|
4193
|
+
:type _headers: dict, optional
|
4194
|
+
:param _host_index: set to override the host_index for a single
|
4195
|
+
request; this effectively ignores the host_index
|
4196
|
+
in the spec for a single request.
|
4197
|
+
:type _host_index: int, optional
|
4198
|
+
:return: Returns the result object.
|
4199
|
+
""" # noqa: E501
|
4200
|
+
|
4201
|
+
_param = self._get_bot_orders_pnl_serialize(
|
4202
|
+
id=id,
|
4203
|
+
sort_order=sort_order,
|
4204
|
+
sort_by=sort_by,
|
4205
|
+
window=window,
|
4206
|
+
period=period,
|
4207
|
+
user_id=user_id,
|
4208
|
+
limit=limit,
|
4209
|
+
_request_auth=_request_auth,
|
4210
|
+
_content_type=_content_type,
|
4211
|
+
_headers=_headers,
|
4212
|
+
_host_index=_host_index,
|
4213
|
+
)
|
4214
|
+
|
4215
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
4216
|
+
"200": "List[PnL]",
|
4217
|
+
}
|
4218
|
+
response_data = await self.api_client.call_api(
|
4219
|
+
*_param, _request_timeout=_request_timeout
|
4220
|
+
)
|
4221
|
+
return response_data
|
4222
|
+
|
4223
|
+
# Private sync implementation methods
|
4224
|
+
@validate_call
|
4225
|
+
def _get_bot_orders_pnl_sync(
|
4226
|
+
self,
|
4227
|
+
id: Annotated[StrictStr, Field(description="The ID of the bot")],
|
4228
|
+
sort_order: Annotated[
|
4229
|
+
Optional[StrictStr], Field(description="The order to sort by")
|
4230
|
+
] = None,
|
4231
|
+
sort_by: Annotated[
|
4232
|
+
Optional[StrictStr], Field(description="The field to sort by")
|
4233
|
+
] = None,
|
4234
|
+
window: Annotated[
|
4235
|
+
Optional[StrictStr],
|
4236
|
+
Field(
|
4237
|
+
description="Time window for PnL. Defaults to full (all time), or use period (last X days), month, quarter, or year for values since the start of that range."
|
4238
|
+
),
|
4239
|
+
] = None,
|
4240
|
+
period: Annotated[
|
4241
|
+
Optional[Annotated[int, Field(le=365, strict=True, ge=1)]],
|
4242
|
+
Field(
|
4243
|
+
description="The number of days to return the PnL for. Only used if `window` is `period`. Default is 30."
|
4244
|
+
),
|
4245
|
+
] = None,
|
4246
|
+
user_id: Annotated[
|
4247
|
+
Optional[StrictStr],
|
4248
|
+
Field(
|
4249
|
+
description="The ID of the user. Defaults to the authenticated user, unless user is an admin."
|
4250
|
+
),
|
4251
|
+
] = None,
|
4252
|
+
limit: Annotated[
|
4253
|
+
Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
|
4254
|
+
Field(
|
4255
|
+
description="The number of items to return. Defaults to None, meaning no limit."
|
4256
|
+
),
|
4257
|
+
] = None,
|
4258
|
+
_request_timeout: Union[
|
4259
|
+
None,
|
4260
|
+
Annotated[StrictFloat, Field(gt=0)],
|
4261
|
+
Tuple[
|
4262
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
4263
|
+
],
|
4264
|
+
] = None,
|
4265
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
4266
|
+
_content_type: Optional[StrictStr] = None,
|
4267
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
4268
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
4269
|
+
) -> List[PnL]:
|
4270
|
+
"""Synchronous version of get_bot_orders_pnl"""
|
4271
|
+
return async_to_sync(self._get_bot_orders_pnl_async)(
|
4272
|
+
id=id,
|
4273
|
+
sort_order=sort_order,
|
4274
|
+
sort_by=sort_by,
|
4275
|
+
window=window,
|
4276
|
+
period=period,
|
4277
|
+
user_id=user_id,
|
4278
|
+
limit=limit,
|
4279
|
+
_request_timeout=_request_timeout,
|
4280
|
+
_request_auth=_request_auth,
|
4281
|
+
_content_type=_content_type,
|
4282
|
+
_headers=_headers,
|
4283
|
+
_host_index=_host_index,
|
4284
|
+
)
|
4285
|
+
|
4286
|
+
@validate_call
|
4287
|
+
def _get_bot_orders_pnl_sync_with_http_info(
|
4288
|
+
self,
|
4289
|
+
id: Annotated[StrictStr, Field(description="The ID of the bot")],
|
4290
|
+
sort_order: Annotated[
|
4291
|
+
Optional[StrictStr], Field(description="The order to sort by")
|
4292
|
+
] = None,
|
4293
|
+
sort_by: Annotated[
|
4294
|
+
Optional[StrictStr], Field(description="The field to sort by")
|
4295
|
+
] = None,
|
4296
|
+
window: Annotated[
|
4297
|
+
Optional[StrictStr],
|
4298
|
+
Field(
|
4299
|
+
description="Time window for PnL. Defaults to full (all time), or use period (last X days), month, quarter, or year for values since the start of that range."
|
4300
|
+
),
|
4301
|
+
] = None,
|
4302
|
+
period: Annotated[
|
4303
|
+
Optional[Annotated[int, Field(le=365, strict=True, ge=1)]],
|
4304
|
+
Field(
|
4305
|
+
description="The number of days to return the PnL for. Only used if `window` is `period`. Default is 30."
|
4306
|
+
),
|
4307
|
+
] = None,
|
4308
|
+
user_id: Annotated[
|
4309
|
+
Optional[StrictStr],
|
4310
|
+
Field(
|
4311
|
+
description="The ID of the user. Defaults to the authenticated user, unless user is an admin."
|
4312
|
+
),
|
4313
|
+
] = None,
|
4314
|
+
limit: Annotated[
|
4315
|
+
Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
|
4316
|
+
Field(
|
4317
|
+
description="The number of items to return. Defaults to None, meaning no limit."
|
4318
|
+
),
|
4319
|
+
] = None,
|
4320
|
+
_request_timeout: Union[
|
4321
|
+
None,
|
4322
|
+
Annotated[StrictFloat, Field(gt=0)],
|
4323
|
+
Tuple[
|
4324
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
4325
|
+
],
|
4326
|
+
] = None,
|
4327
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
4328
|
+
_content_type: Optional[StrictStr] = None,
|
4329
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
4330
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
4331
|
+
) -> ApiResponse[List[PnL]]:
|
4332
|
+
"""Synchronous version of get_bot_orders_pnl_with_http_info"""
|
4333
|
+
return async_to_sync(self._get_bot_orders_pnl_async_with_http_info)(
|
4334
|
+
id=id,
|
4335
|
+
sort_order=sort_order,
|
4336
|
+
sort_by=sort_by,
|
4337
|
+
window=window,
|
4338
|
+
period=period,
|
4339
|
+
user_id=user_id,
|
4340
|
+
limit=limit,
|
4341
|
+
_request_timeout=_request_timeout,
|
4342
|
+
_request_auth=_request_auth,
|
4343
|
+
_content_type=_content_type,
|
4344
|
+
_headers=_headers,
|
4345
|
+
_host_index=_host_index,
|
4346
|
+
)
|
4347
|
+
|
4348
|
+
@validate_call
|
4349
|
+
def _get_bot_orders_pnl_sync_without_preload_content(
|
4350
|
+
self,
|
4351
|
+
id: Annotated[StrictStr, Field(description="The ID of the bot")],
|
4352
|
+
sort_order: Annotated[
|
4353
|
+
Optional[StrictStr], Field(description="The order to sort by")
|
4354
|
+
] = None,
|
4355
|
+
sort_by: Annotated[
|
4356
|
+
Optional[StrictStr], Field(description="The field to sort by")
|
4357
|
+
] = None,
|
4358
|
+
window: Annotated[
|
4359
|
+
Optional[StrictStr],
|
4360
|
+
Field(
|
4361
|
+
description="Time window for PnL. Defaults to full (all time), or use period (last X days), month, quarter, or year for values since the start of that range."
|
4362
|
+
),
|
4363
|
+
] = None,
|
4364
|
+
period: Annotated[
|
4365
|
+
Optional[Annotated[int, Field(le=365, strict=True, ge=1)]],
|
4366
|
+
Field(
|
4367
|
+
description="The number of days to return the PnL for. Only used if `window` is `period`. Default is 30."
|
4368
|
+
),
|
4369
|
+
] = None,
|
4370
|
+
user_id: Annotated[
|
4371
|
+
Optional[StrictStr],
|
4372
|
+
Field(
|
4373
|
+
description="The ID of the user. Defaults to the authenticated user, unless user is an admin."
|
4374
|
+
),
|
4375
|
+
] = None,
|
4376
|
+
limit: Annotated[
|
4377
|
+
Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
|
4378
|
+
Field(
|
4379
|
+
description="The number of items to return. Defaults to None, meaning no limit."
|
4380
|
+
),
|
4381
|
+
] = None,
|
4382
|
+
_request_timeout: Union[
|
4383
|
+
None,
|
4384
|
+
Annotated[StrictFloat, Field(gt=0)],
|
4385
|
+
Tuple[
|
4386
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
4387
|
+
],
|
4388
|
+
] = None,
|
4389
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
4390
|
+
_content_type: Optional[StrictStr] = None,
|
4391
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
4392
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
4393
|
+
) -> RESTResponseType:
|
4394
|
+
"""Synchronous version of get_bot_orders_pnl_without_preload_content"""
|
4395
|
+
return async_to_sync(self._get_bot_orders_pnl_async_without_preload_content)(
|
4396
|
+
id=id,
|
4397
|
+
sort_order=sort_order,
|
4398
|
+
sort_by=sort_by,
|
4399
|
+
window=window,
|
4400
|
+
period=period,
|
4401
|
+
user_id=user_id,
|
4402
|
+
limit=limit,
|
4403
|
+
_request_timeout=_request_timeout,
|
4404
|
+
_request_auth=_request_auth,
|
4405
|
+
_content_type=_content_type,
|
4406
|
+
_headers=_headers,
|
4407
|
+
_host_index=_host_index,
|
4408
|
+
)
|
4409
|
+
|
4410
|
+
def _get_bot_orders_pnl_serialize(
|
4411
|
+
self,
|
4412
|
+
id,
|
4413
|
+
sort_order,
|
4414
|
+
sort_by,
|
4415
|
+
window,
|
4416
|
+
period,
|
4417
|
+
user_id,
|
4418
|
+
limit,
|
4419
|
+
_request_auth,
|
4420
|
+
_content_type,
|
4421
|
+
_headers,
|
4422
|
+
_host_index,
|
4423
|
+
) -> RequestSerialized:
|
4424
|
+
|
4425
|
+
_host = None
|
4426
|
+
|
4427
|
+
_collection_formats: Dict[str, str] = {}
|
4428
|
+
|
4429
|
+
_path_params: Dict[str, str] = {}
|
4430
|
+
_query_params: List[Tuple[str, str]] = []
|
4431
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
4432
|
+
_form_params: List[Tuple[str, str]] = []
|
4433
|
+
_files: Dict[
|
4434
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
4435
|
+
] = {}
|
4436
|
+
_body_params: Optional[bytes] = None
|
4437
|
+
|
4438
|
+
# process the path parameters
|
4439
|
+
if id is not None:
|
4440
|
+
_path_params["id"] = id
|
4441
|
+
# process the query parameters
|
4442
|
+
if sort_order is not None:
|
4443
|
+
|
4444
|
+
_query_params.append(("sort_order", sort_order))
|
4445
|
+
|
4446
|
+
if sort_by is not None:
|
4447
|
+
|
4448
|
+
_query_params.append(("sort_by", sort_by))
|
4449
|
+
|
4450
|
+
if window is not None:
|
4451
|
+
|
4452
|
+
_query_params.append(("window", window))
|
4453
|
+
|
4454
|
+
if period is not None:
|
4455
|
+
|
4456
|
+
_query_params.append(("period", period))
|
4457
|
+
|
4458
|
+
if user_id is not None:
|
4459
|
+
|
4460
|
+
_query_params.append(("user_id", user_id))
|
4461
|
+
|
4462
|
+
if limit is not None:
|
4463
|
+
|
4464
|
+
_query_params.append(("limit", limit))
|
4465
|
+
|
4466
|
+
# process the header parameters
|
4467
|
+
# process the form parameters
|
4468
|
+
# process the body parameter
|
4469
|
+
|
4470
|
+
# set the HTTP header `Accept`
|
4471
|
+
if "Accept" not in _header_params:
|
4472
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
4473
|
+
["application/json"]
|
4474
|
+
)
|
4475
|
+
|
4476
|
+
# authentication setting
|
4477
|
+
_auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]
|
4478
|
+
|
4479
|
+
return self.api_client.param_serialize(
|
4480
|
+
method="GET",
|
4481
|
+
resource_path="/bots/{id}/orders/pnl",
|
4482
|
+
path_params=_path_params,
|
4483
|
+
query_params=_query_params,
|
4484
|
+
header_params=_header_params,
|
4485
|
+
body=_body_params,
|
4486
|
+
post_params=_form_params,
|
4487
|
+
files=_files,
|
4488
|
+
auth_settings=_auth_settings,
|
4489
|
+
collection_formats=_collection_formats,
|
4490
|
+
_host=_host,
|
4491
|
+
_request_auth=_request_auth,
|
4492
|
+
)
|
4493
|
+
|
4494
|
+
@validate_call
|
4495
|
+
def get_bots(
|
4496
|
+
self,
|
4497
|
+
filter_by: Annotated[
|
4498
|
+
Optional[StrictStr], Field(description="The field to filter by")
|
4499
|
+
] = None,
|
4500
|
+
filter_value: Annotated[
|
4501
|
+
Optional[StrictStr], Field(description="The value to filter with")
|
4502
|
+
] = None,
|
4503
|
+
sort_order: Annotated[
|
4504
|
+
Optional[StrictStr], Field(description="The order to sort by")
|
4505
|
+
] = None,
|
4506
|
+
sort_by: Annotated[
|
4507
|
+
Optional[StrictStr], Field(description="The field to sort by")
|
4508
|
+
] = None,
|
4509
|
+
include_deleted: Annotated[
|
4510
|
+
Optional[StrictBool],
|
4511
|
+
Field(
|
4512
|
+
description="Whether to include deleted bots. Filter by status takes precedence over this."
|
4513
|
+
),
|
4514
|
+
] = None,
|
4515
|
+
should_validate: Annotated[
|
4516
|
+
Optional[StrictBool], Field(description="Whether to validate the bots")
|
4517
|
+
] = None,
|
4518
|
+
_request_timeout: Union[
|
4519
|
+
None,
|
4520
|
+
Annotated[StrictFloat, Field(gt=0)],
|
4521
|
+
Tuple[
|
4522
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
4523
|
+
],
|
4524
|
+
] = None,
|
4525
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
4526
|
+
_content_type: Optional[StrictStr] = None,
|
4527
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
4528
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
4529
|
+
) -> List[Bot]:
|
4530
|
+
"""Get Bots"""
|
4531
|
+
if self.is_sync:
|
4532
|
+
return self._get_bots_sync(
|
4533
|
+
filter_by=filter_by,
|
4534
|
+
filter_value=filter_value,
|
4535
|
+
sort_order=sort_order,
|
4536
|
+
sort_by=sort_by,
|
4537
|
+
include_deleted=include_deleted,
|
4538
|
+
should_validate=should_validate,
|
4539
|
+
_request_timeout=_request_timeout,
|
4540
|
+
_request_auth=_request_auth,
|
4541
|
+
_content_type=_content_type,
|
4542
|
+
_headers=_headers,
|
4543
|
+
_host_index=_host_index,
|
4544
|
+
)
|
4545
|
+
|
4546
|
+
else:
|
4547
|
+
return self._get_bots_async(
|
4548
|
+
filter_by=filter_by,
|
4549
|
+
filter_value=filter_value,
|
4550
|
+
sort_order=sort_order,
|
4551
|
+
sort_by=sort_by,
|
4552
|
+
include_deleted=include_deleted,
|
4553
|
+
should_validate=should_validate,
|
4554
|
+
_request_timeout=_request_timeout,
|
4555
|
+
_request_auth=_request_auth,
|
4556
|
+
_content_type=_content_type,
|
4557
|
+
_headers=_headers,
|
4558
|
+
_host_index=_host_index,
|
4559
|
+
)
|
4560
|
+
|
4561
|
+
@validate_call
|
4562
|
+
def get_bots_with_http_info(
|
4563
|
+
self,
|
4564
|
+
filter_by: Annotated[
|
4565
|
+
Optional[StrictStr], Field(description="The field to filter by")
|
4566
|
+
] = None,
|
4567
|
+
filter_value: Annotated[
|
4568
|
+
Optional[StrictStr], Field(description="The value to filter with")
|
4569
|
+
] = None,
|
4570
|
+
sort_order: Annotated[
|
4571
|
+
Optional[StrictStr], Field(description="The order to sort by")
|
4572
|
+
] = None,
|
4573
|
+
sort_by: Annotated[
|
4574
|
+
Optional[StrictStr], Field(description="The field to sort by")
|
4575
|
+
] = None,
|
4576
|
+
include_deleted: Annotated[
|
4577
|
+
Optional[StrictBool],
|
4578
|
+
Field(
|
4579
|
+
description="Whether to include deleted bots. Filter by status takes precedence over this."
|
4580
|
+
),
|
4581
|
+
] = None,
|
4582
|
+
should_validate: Annotated[
|
4583
|
+
Optional[StrictBool], Field(description="Whether to validate the bots")
|
4584
|
+
] = None,
|
4585
|
+
_request_timeout: Union[
|
4586
|
+
None,
|
4587
|
+
Annotated[StrictFloat, Field(gt=0)],
|
4588
|
+
Tuple[
|
4589
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
4590
|
+
],
|
4591
|
+
] = None,
|
4592
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
4593
|
+
_content_type: Optional[StrictStr] = None,
|
4594
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
4595
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
4596
|
+
) -> ApiResponse[List[Bot]]:
|
4597
|
+
"""Get Bots with HTTP info"""
|
4598
|
+
if self.is_sync:
|
4599
|
+
return self._get_bots_sync_with_http_info(
|
4600
|
+
filter_by=filter_by,
|
4601
|
+
filter_value=filter_value,
|
4602
|
+
sort_order=sort_order,
|
4603
|
+
sort_by=sort_by,
|
4604
|
+
include_deleted=include_deleted,
|
4605
|
+
should_validate=should_validate,
|
4606
|
+
_request_timeout=_request_timeout,
|
4607
|
+
_request_auth=_request_auth,
|
4608
|
+
_content_type=_content_type,
|
4609
|
+
_headers=_headers,
|
4610
|
+
_host_index=_host_index,
|
4611
|
+
)
|
4612
|
+
|
4613
|
+
else:
|
4614
|
+
return self._get_bots_async_with_http_info(
|
4615
|
+
filter_by=filter_by,
|
4616
|
+
filter_value=filter_value,
|
4617
|
+
sort_order=sort_order,
|
4618
|
+
sort_by=sort_by,
|
4619
|
+
include_deleted=include_deleted,
|
4620
|
+
should_validate=should_validate,
|
4621
|
+
_request_timeout=_request_timeout,
|
4622
|
+
_request_auth=_request_auth,
|
4623
|
+
_content_type=_content_type,
|
4624
|
+
_headers=_headers,
|
4625
|
+
_host_index=_host_index,
|
4626
|
+
)
|
4627
|
+
|
4628
|
+
@validate_call
|
4629
|
+
def get_bots_without_preload_content(
|
4630
|
+
self,
|
4631
|
+
filter_by: Annotated[
|
4632
|
+
Optional[StrictStr], Field(description="The field to filter by")
|
4633
|
+
] = None,
|
4634
|
+
filter_value: Annotated[
|
4635
|
+
Optional[StrictStr], Field(description="The value to filter with")
|
4636
|
+
] = None,
|
4637
|
+
sort_order: Annotated[
|
4638
|
+
Optional[StrictStr], Field(description="The order to sort by")
|
4639
|
+
] = None,
|
4640
|
+
sort_by: Annotated[
|
4641
|
+
Optional[StrictStr], Field(description="The field to sort by")
|
4642
|
+
] = None,
|
4643
|
+
include_deleted: Annotated[
|
4644
|
+
Optional[StrictBool],
|
4645
|
+
Field(
|
4646
|
+
description="Whether to include deleted bots. Filter by status takes precedence over this."
|
4647
|
+
),
|
4648
|
+
] = None,
|
4649
|
+
should_validate: Annotated[
|
4650
|
+
Optional[StrictBool], Field(description="Whether to validate the bots")
|
4651
|
+
] = None,
|
4652
|
+
_request_timeout: Union[
|
4653
|
+
None,
|
4654
|
+
Annotated[StrictFloat, Field(gt=0)],
|
4655
|
+
Tuple[
|
4656
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
4657
|
+
],
|
4658
|
+
] = None,
|
4659
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
4660
|
+
_content_type: Optional[StrictStr] = None,
|
4661
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
4662
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
4663
|
+
) -> RESTResponseType:
|
4664
|
+
"""Get Bots without preloading content"""
|
4665
|
+
if self.is_sync:
|
4666
|
+
return self._get_bots_sync_without_preload_content(
|
4667
|
+
filter_by=filter_by,
|
4668
|
+
filter_value=filter_value,
|
4669
|
+
sort_order=sort_order,
|
4670
|
+
sort_by=sort_by,
|
4671
|
+
include_deleted=include_deleted,
|
4672
|
+
should_validate=should_validate,
|
4673
|
+
_request_timeout=_request_timeout,
|
4674
|
+
_request_auth=_request_auth,
|
4675
|
+
_content_type=_content_type,
|
4676
|
+
_headers=_headers,
|
4677
|
+
_host_index=_host_index,
|
4678
|
+
)
|
4679
|
+
|
4680
|
+
else:
|
4681
|
+
return self._get_bots_async_without_preload_content(
|
4682
|
+
filter_by=filter_by,
|
4683
|
+
filter_value=filter_value,
|
4684
|
+
sort_order=sort_order,
|
4685
|
+
sort_by=sort_by,
|
4686
|
+
include_deleted=include_deleted,
|
4687
|
+
should_validate=should_validate,
|
4688
|
+
_request_timeout=_request_timeout,
|
4689
|
+
_request_auth=_request_auth,
|
4690
|
+
_content_type=_content_type,
|
4691
|
+
_headers=_headers,
|
4692
|
+
_host_index=_host_index,
|
4693
|
+
)
|
4694
|
+
|
4695
|
+
# Private async implementation methods
|
4696
|
+
@validate_call
|
4697
|
+
async def _get_bots_async(
|
4698
|
+
self,
|
4699
|
+
filter_by: Annotated[
|
4700
|
+
Optional[StrictStr], Field(description="The field to filter by")
|
4701
|
+
] = None,
|
4702
|
+
filter_value: Annotated[
|
4703
|
+
Optional[StrictStr], Field(description="The value to filter with")
|
4704
|
+
] = None,
|
4705
|
+
sort_order: Annotated[
|
4706
|
+
Optional[StrictStr], Field(description="The order to sort by")
|
4707
|
+
] = None,
|
4708
|
+
sort_by: Annotated[
|
4709
|
+
Optional[StrictStr], Field(description="The field to sort by")
|
4710
|
+
] = None,
|
4711
|
+
include_deleted: Annotated[
|
4712
|
+
Optional[StrictBool],
|
4713
|
+
Field(
|
4714
|
+
description="Whether to include deleted bots. Filter by status takes precedence over this."
|
4715
|
+
),
|
4716
|
+
] = None,
|
4717
|
+
should_validate: Annotated[
|
4718
|
+
Optional[StrictBool], Field(description="Whether to validate the bots")
|
4719
|
+
] = None,
|
4720
|
+
_request_timeout: Union[
|
4721
|
+
None,
|
4722
|
+
Annotated[StrictFloat, Field(gt=0)],
|
4723
|
+
Tuple[
|
4724
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
4725
|
+
],
|
4726
|
+
] = None,
|
4727
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
4728
|
+
_content_type: Optional[StrictStr] = None,
|
4729
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
4730
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
4731
|
+
) -> List[Bot]:
|
4732
|
+
"""Get Bots
|
4733
|
+
|
4734
|
+
|
4735
|
+
:param filter_by: The field to filter by
|
4736
|
+
:type filter_by: str
|
4737
|
+
:param filter_value: The value to filter with
|
4738
|
+
:type filter_value: str
|
4739
|
+
:param sort_order: The order to sort by
|
4740
|
+
:type sort_order: str
|
4741
|
+
:param sort_by: The field to sort by
|
4742
|
+
:type sort_by: str
|
4743
|
+
:param include_deleted: Whether to include deleted bots. Filter by status takes precedence over this.
|
4744
|
+
:type include_deleted: bool
|
4745
|
+
:param should_validate: Whether to validate the bots
|
4746
|
+
:type should_validate: bool
|
4747
|
+
:param _request_timeout: timeout setting for this request. If one
|
4748
|
+
number provided, it will be total request
|
4749
|
+
timeout. It can also be a pair (tuple) of
|
4750
|
+
(connection, read) timeouts.
|
4751
|
+
:type _request_timeout: int, tuple(int, int), optional
|
4752
|
+
:param _request_auth: set to override the auth_settings for an a single
|
4753
|
+
request; this effectively ignores the
|
4754
|
+
authentication in the spec for a single request.
|
4755
|
+
:type _request_auth: dict, optional
|
4756
|
+
:param _content_type: force content-type for the request.
|
4757
|
+
:type _content_type: str, Optional
|
4758
|
+
:param _headers: set to override the headers for a single
|
4759
|
+
request; this effectively ignores the headers
|
4760
|
+
in the spec for a single request.
|
4761
|
+
:type _headers: dict, optional
|
4762
|
+
:param _host_index: set to override the host_index for a single
|
4763
|
+
request; this effectively ignores the host_index
|
4764
|
+
in the spec for a single request.
|
4765
|
+
:type _host_index: int, optional
|
4766
|
+
:return: Returns the result object.
|
4767
|
+
""" # noqa: E501
|
4768
|
+
|
4769
|
+
_param = self._get_bots_serialize(
|
4770
|
+
filter_by=filter_by,
|
4771
|
+
filter_value=filter_value,
|
4772
|
+
sort_order=sort_order,
|
4773
|
+
sort_by=sort_by,
|
4774
|
+
include_deleted=include_deleted,
|
4775
|
+
should_validate=should_validate,
|
4776
|
+
_request_auth=_request_auth,
|
4777
|
+
_content_type=_content_type,
|
4778
|
+
_headers=_headers,
|
4779
|
+
_host_index=_host_index,
|
4780
|
+
)
|
4781
|
+
|
4782
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
4783
|
+
"200": "List[Bot]",
|
4784
|
+
}
|
4785
|
+
response_data = await self.api_client.call_api(
|
4786
|
+
*_param, _request_timeout=_request_timeout
|
4787
|
+
)
|
4788
|
+
await response_data.read()
|
4789
|
+
return self.api_client.response_deserialize(
|
4790
|
+
response_data=response_data,
|
4791
|
+
response_types_map=_response_types_map,
|
4792
|
+
).data
|
4793
|
+
|
4794
|
+
@validate_call
|
4795
|
+
async def _get_bots_async_with_http_info(
|
4796
|
+
self,
|
4797
|
+
filter_by: Annotated[
|
4798
|
+
Optional[StrictStr], Field(description="The field to filter by")
|
4799
|
+
] = None,
|
4800
|
+
filter_value: Annotated[
|
4801
|
+
Optional[StrictStr], Field(description="The value to filter with")
|
4802
|
+
] = None,
|
4803
|
+
sort_order: Annotated[
|
4804
|
+
Optional[StrictStr], Field(description="The order to sort by")
|
4805
|
+
] = None,
|
4806
|
+
sort_by: Annotated[
|
4807
|
+
Optional[StrictStr], Field(description="The field to sort by")
|
4808
|
+
] = None,
|
4809
|
+
include_deleted: Annotated[
|
4810
|
+
Optional[StrictBool],
|
4811
|
+
Field(
|
4812
|
+
description="Whether to include deleted bots. Filter by status takes precedence over this."
|
4813
|
+
),
|
4814
|
+
] = None,
|
4815
|
+
should_validate: Annotated[
|
4816
|
+
Optional[StrictBool], Field(description="Whether to validate the bots")
|
4817
|
+
] = None,
|
4818
|
+
_request_timeout: Union[
|
4819
|
+
None,
|
4820
|
+
Annotated[StrictFloat, Field(gt=0)],
|
4821
|
+
Tuple[
|
4822
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
4823
|
+
],
|
4824
|
+
] = None,
|
4825
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
4826
|
+
_content_type: Optional[StrictStr] = None,
|
4827
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
4828
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
4829
|
+
) -> ApiResponse[List[Bot]]:
|
4830
|
+
"""Get Bots
|
4831
|
+
|
4832
|
+
|
4833
|
+
:param filter_by: The field to filter by
|
4834
|
+
:type filter_by: str
|
4835
|
+
:param filter_value: The value to filter with
|
4836
|
+
:type filter_value: str
|
4837
|
+
:param sort_order: The order to sort by
|
4838
|
+
:type sort_order: str
|
4839
|
+
:param sort_by: The field to sort by
|
4840
|
+
:type sort_by: str
|
4841
|
+
:param include_deleted: Whether to include deleted bots. Filter by status takes precedence over this.
|
4842
|
+
:type include_deleted: bool
|
4843
|
+
:param should_validate: Whether to validate the bots
|
4844
|
+
:type should_validate: bool
|
4845
|
+
:param _request_timeout: timeout setting for this request. If one
|
4846
|
+
number provided, it will be total request
|
4847
|
+
timeout. It can also be a pair (tuple) of
|
4848
|
+
(connection, read) timeouts.
|
4849
|
+
:type _request_timeout: int, tuple(int, int), optional
|
4850
|
+
:param _request_auth: set to override the auth_settings for an a single
|
4851
|
+
request; this effectively ignores the
|
4852
|
+
authentication in the spec for a single request.
|
4853
|
+
:type _request_auth: dict, optional
|
4854
|
+
:param _content_type: force content-type for the request.
|
4855
|
+
:type _content_type: str, Optional
|
4856
|
+
:param _headers: set to override the headers for a single
|
4857
|
+
request; this effectively ignores the headers
|
4858
|
+
in the spec for a single request.
|
4859
|
+
:type _headers: dict, optional
|
4860
|
+
:param _host_index: set to override the host_index for a single
|
4861
|
+
request; this effectively ignores the host_index
|
4862
|
+
in the spec for a single request.
|
4863
|
+
:type _host_index: int, optional
|
4864
|
+
:return: Returns the result object.
|
4865
|
+
""" # noqa: E501
|
4866
|
+
|
4867
|
+
_param = self._get_bots_serialize(
|
4868
|
+
filter_by=filter_by,
|
4869
|
+
filter_value=filter_value,
|
4870
|
+
sort_order=sort_order,
|
4871
|
+
sort_by=sort_by,
|
4872
|
+
include_deleted=include_deleted,
|
4873
|
+
should_validate=should_validate,
|
4874
|
+
_request_auth=_request_auth,
|
4875
|
+
_content_type=_content_type,
|
4876
|
+
_headers=_headers,
|
4877
|
+
_host_index=_host_index,
|
4878
|
+
)
|
4879
|
+
|
4880
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
4881
|
+
"200": "List[Bot]",
|
4882
|
+
}
|
4883
|
+
response_data = await self.api_client.call_api(
|
4884
|
+
*_param, _request_timeout=_request_timeout
|
4885
|
+
)
|
4886
|
+
await response_data.read()
|
4887
|
+
return self.api_client.response_deserialize(
|
4888
|
+
response_data=response_data, response_types_map=_response_types_map
|
4889
|
+
)
|
4890
|
+
|
4891
|
+
@validate_call
|
4892
|
+
async def _get_bots_async_without_preload_content(
|
4893
|
+
self,
|
4894
|
+
filter_by: Annotated[
|
4895
|
+
Optional[StrictStr], Field(description="The field to filter by")
|
4896
|
+
] = None,
|
4897
|
+
filter_value: Annotated[
|
4898
|
+
Optional[StrictStr], Field(description="The value to filter with")
|
4899
|
+
] = None,
|
4900
|
+
sort_order: Annotated[
|
4901
|
+
Optional[StrictStr], Field(description="The order to sort by")
|
4902
|
+
] = None,
|
4903
|
+
sort_by: Annotated[
|
4904
|
+
Optional[StrictStr], Field(description="The field to sort by")
|
4905
|
+
] = None,
|
4906
|
+
include_deleted: Annotated[
|
4907
|
+
Optional[StrictBool],
|
4908
|
+
Field(
|
4909
|
+
description="Whether to include deleted bots. Filter by status takes precedence over this."
|
4910
|
+
),
|
4911
|
+
] = None,
|
4912
|
+
should_validate: Annotated[
|
4913
|
+
Optional[StrictBool], Field(description="Whether to validate the bots")
|
4914
|
+
] = None,
|
4915
|
+
_request_timeout: Union[
|
4916
|
+
None,
|
4917
|
+
Annotated[StrictFloat, Field(gt=0)],
|
4918
|
+
Tuple[
|
4919
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
4920
|
+
],
|
4921
|
+
] = None,
|
4922
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
4923
|
+
_content_type: Optional[StrictStr] = None,
|
4924
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
4925
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
4926
|
+
) -> RESTResponseType:
|
4927
|
+
"""Get Bots
|
4928
|
+
|
4929
|
+
|
4930
|
+
:param filter_by: The field to filter by
|
4931
|
+
:type filter_by: str
|
4932
|
+
:param filter_value: The value to filter with
|
4933
|
+
:type filter_value: str
|
4934
|
+
:param sort_order: The order to sort by
|
4935
|
+
:type sort_order: str
|
4936
|
+
:param sort_by: The field to sort by
|
4937
|
+
:type sort_by: str
|
4938
|
+
:param include_deleted: Whether to include deleted bots. Filter by status takes precedence over this.
|
4939
|
+
:type include_deleted: bool
|
4940
|
+
:param should_validate: Whether to validate the bots
|
4941
|
+
:type should_validate: bool
|
4942
|
+
:param _request_timeout: timeout setting for this request. If one
|
4943
|
+
number provided, it will be total request
|
4944
|
+
timeout. It can also be a pair (tuple) of
|
4945
|
+
(connection, read) timeouts.
|
4946
|
+
:type _request_timeout: int, tuple(int, int), optional
|
4947
|
+
:param _request_auth: set to override the auth_settings for an a single
|
4948
|
+
request; this effectively ignores the
|
4949
|
+
authentication in the spec for a single request.
|
4950
|
+
:type _request_auth: dict, optional
|
4951
|
+
:param _content_type: force content-type for the request.
|
4952
|
+
:type _content_type: str, Optional
|
4953
|
+
:param _headers: set to override the headers for a single
|
4954
|
+
request; this effectively ignores the headers
|
4955
|
+
in the spec for a single request.
|
4956
|
+
:type _headers: dict, optional
|
4957
|
+
:param _host_index: set to override the host_index for a single
|
4958
|
+
request; this effectively ignores the host_index
|
4959
|
+
in the spec for a single request.
|
4960
|
+
:type _host_index: int, optional
|
4961
|
+
:return: Returns the result object.
|
4962
|
+
""" # noqa: E501
|
4963
|
+
|
4964
|
+
_param = self._get_bots_serialize(
|
4965
|
+
filter_by=filter_by,
|
4966
|
+
filter_value=filter_value,
|
4967
|
+
sort_order=sort_order,
|
4968
|
+
sort_by=sort_by,
|
4969
|
+
include_deleted=include_deleted,
|
4970
|
+
should_validate=should_validate,
|
4971
|
+
_request_auth=_request_auth,
|
4972
|
+
_content_type=_content_type,
|
4973
|
+
_headers=_headers,
|
4974
|
+
_host_index=_host_index,
|
4975
|
+
)
|
4976
|
+
|
4977
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
4978
|
+
"200": "List[Bot]",
|
4979
|
+
}
|
4980
|
+
response_data = await self.api_client.call_api(
|
4981
|
+
*_param, _request_timeout=_request_timeout
|
4982
|
+
)
|
4983
|
+
return response_data
|
4984
|
+
|
4985
|
+
# Private sync implementation methods
|
4986
|
+
@validate_call
|
4987
|
+
def _get_bots_sync(
|
4988
|
+
self,
|
4989
|
+
filter_by: Annotated[
|
4990
|
+
Optional[StrictStr], Field(description="The field to filter by")
|
4991
|
+
] = None,
|
4992
|
+
filter_value: Annotated[
|
4993
|
+
Optional[StrictStr], Field(description="The value to filter with")
|
4994
|
+
] = None,
|
4995
|
+
sort_order: Annotated[
|
4996
|
+
Optional[StrictStr], Field(description="The order to sort by")
|
4997
|
+
] = None,
|
4998
|
+
sort_by: Annotated[
|
4999
|
+
Optional[StrictStr], Field(description="The field to sort by")
|
5000
|
+
] = None,
|
5001
|
+
include_deleted: Annotated[
|
5002
|
+
Optional[StrictBool],
|
5003
|
+
Field(
|
5004
|
+
description="Whether to include deleted bots. Filter by status takes precedence over this."
|
5005
|
+
),
|
5006
|
+
] = None,
|
5007
|
+
should_validate: Annotated[
|
5008
|
+
Optional[StrictBool], Field(description="Whether to validate the bots")
|
5009
|
+
] = None,
|
5010
|
+
_request_timeout: Union[
|
5011
|
+
None,
|
5012
|
+
Annotated[StrictFloat, Field(gt=0)],
|
5013
|
+
Tuple[
|
5014
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
5015
|
+
],
|
5016
|
+
] = None,
|
5017
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
5018
|
+
_content_type: Optional[StrictStr] = None,
|
5019
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
5020
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
5021
|
+
) -> List[Bot]:
|
5022
|
+
"""Synchronous version of get_bots"""
|
5023
|
+
return async_to_sync(self._get_bots_async)(
|
5024
|
+
filter_by=filter_by,
|
5025
|
+
filter_value=filter_value,
|
5026
|
+
sort_order=sort_order,
|
5027
|
+
sort_by=sort_by,
|
5028
|
+
include_deleted=include_deleted,
|
5029
|
+
should_validate=should_validate,
|
5030
|
+
_request_timeout=_request_timeout,
|
5031
|
+
_request_auth=_request_auth,
|
5032
|
+
_content_type=_content_type,
|
5033
|
+
_headers=_headers,
|
5034
|
+
_host_index=_host_index,
|
5035
|
+
)
|
5036
|
+
|
5037
|
+
@validate_call
|
5038
|
+
def _get_bots_sync_with_http_info(
|
5039
|
+
self,
|
5040
|
+
filter_by: Annotated[
|
5041
|
+
Optional[StrictStr], Field(description="The field to filter by")
|
5042
|
+
] = None,
|
5043
|
+
filter_value: Annotated[
|
5044
|
+
Optional[StrictStr], Field(description="The value to filter with")
|
5045
|
+
] = None,
|
5046
|
+
sort_order: Annotated[
|
5047
|
+
Optional[StrictStr], Field(description="The order to sort by")
|
5048
|
+
] = None,
|
5049
|
+
sort_by: Annotated[
|
5050
|
+
Optional[StrictStr], Field(description="The field to sort by")
|
5051
|
+
] = None,
|
5052
|
+
include_deleted: Annotated[
|
5053
|
+
Optional[StrictBool],
|
5054
|
+
Field(
|
5055
|
+
description="Whether to include deleted bots. Filter by status takes precedence over this."
|
5056
|
+
),
|
5057
|
+
] = None,
|
5058
|
+
should_validate: Annotated[
|
5059
|
+
Optional[StrictBool], Field(description="Whether to validate the bots")
|
5060
|
+
] = None,
|
5061
|
+
_request_timeout: Union[
|
5062
|
+
None,
|
5063
|
+
Annotated[StrictFloat, Field(gt=0)],
|
5064
|
+
Tuple[
|
5065
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
5066
|
+
],
|
5067
|
+
] = None,
|
5068
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
5069
|
+
_content_type: Optional[StrictStr] = None,
|
5070
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
5071
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
5072
|
+
) -> ApiResponse[List[Bot]]:
|
5073
|
+
"""Synchronous version of get_bots_with_http_info"""
|
5074
|
+
return async_to_sync(self._get_bots_async_with_http_info)(
|
5075
|
+
filter_by=filter_by,
|
5076
|
+
filter_value=filter_value,
|
5077
|
+
sort_order=sort_order,
|
5078
|
+
sort_by=sort_by,
|
5079
|
+
include_deleted=include_deleted,
|
5080
|
+
should_validate=should_validate,
|
5081
|
+
_request_timeout=_request_timeout,
|
5082
|
+
_request_auth=_request_auth,
|
5083
|
+
_content_type=_content_type,
|
5084
|
+
_headers=_headers,
|
5085
|
+
_host_index=_host_index,
|
5086
|
+
)
|
5087
|
+
|
5088
|
+
@validate_call
|
5089
|
+
def _get_bots_sync_without_preload_content(
|
5090
|
+
self,
|
5091
|
+
filter_by: Annotated[
|
5092
|
+
Optional[StrictStr], Field(description="The field to filter by")
|
5093
|
+
] = None,
|
5094
|
+
filter_value: Annotated[
|
5095
|
+
Optional[StrictStr], Field(description="The value to filter with")
|
5096
|
+
] = None,
|
5097
|
+
sort_order: Annotated[
|
5098
|
+
Optional[StrictStr], Field(description="The order to sort by")
|
5099
|
+
] = None,
|
5100
|
+
sort_by: Annotated[
|
5101
|
+
Optional[StrictStr], Field(description="The field to sort by")
|
5102
|
+
] = None,
|
5103
|
+
include_deleted: Annotated[
|
5104
|
+
Optional[StrictBool],
|
5105
|
+
Field(
|
5106
|
+
description="Whether to include deleted bots. Filter by status takes precedence over this."
|
5107
|
+
),
|
5108
|
+
] = None,
|
5109
|
+
should_validate: Annotated[
|
5110
|
+
Optional[StrictBool], Field(description="Whether to validate the bots")
|
5111
|
+
] = None,
|
5112
|
+
_request_timeout: Union[
|
5113
|
+
None,
|
5114
|
+
Annotated[StrictFloat, Field(gt=0)],
|
5115
|
+
Tuple[
|
5116
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
5117
|
+
],
|
5118
|
+
] = None,
|
5119
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
5120
|
+
_content_type: Optional[StrictStr] = None,
|
5121
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
5122
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
5123
|
+
) -> RESTResponseType:
|
5124
|
+
"""Synchronous version of get_bots_without_preload_content"""
|
5125
|
+
return async_to_sync(self._get_bots_async_without_preload_content)(
|
5126
|
+
filter_by=filter_by,
|
5127
|
+
filter_value=filter_value,
|
5128
|
+
sort_order=sort_order,
|
5129
|
+
sort_by=sort_by,
|
5130
|
+
include_deleted=include_deleted,
|
5131
|
+
should_validate=should_validate,
|
3618
5132
|
_request_timeout=_request_timeout,
|
3619
5133
|
_request_auth=_request_auth,
|
3620
5134
|
_content_type=_content_type,
|
@@ -3622,15 +5136,14 @@ class BotsApi:
|
|
3622
5136
|
_host_index=_host_index,
|
3623
5137
|
)
|
3624
5138
|
|
3625
|
-
def
|
5139
|
+
def _get_bots_serialize(
|
3626
5140
|
self,
|
3627
|
-
|
5141
|
+
filter_by,
|
5142
|
+
filter_value,
|
3628
5143
|
sort_order,
|
3629
5144
|
sort_by,
|
3630
|
-
|
3631
|
-
|
3632
|
-
user_id,
|
3633
|
-
limit,
|
5145
|
+
include_deleted,
|
5146
|
+
should_validate,
|
3634
5147
|
_request_auth,
|
3635
5148
|
_content_type,
|
3636
5149
|
_headers,
|
@@ -3651,32 +5164,30 @@ class BotsApi:
|
|
3651
5164
|
_body_params: Optional[bytes] = None
|
3652
5165
|
|
3653
5166
|
# process the path parameters
|
3654
|
-
if id is not None:
|
3655
|
-
_path_params["id"] = id
|
3656
5167
|
# process the query parameters
|
3657
|
-
if
|
5168
|
+
if filter_by is not None:
|
3658
5169
|
|
3659
|
-
_query_params.append(("
|
5170
|
+
_query_params.append(("filter_by", filter_by))
|
3660
5171
|
|
3661
|
-
if
|
5172
|
+
if filter_value is not None:
|
3662
5173
|
|
3663
|
-
_query_params.append(("
|
5174
|
+
_query_params.append(("filter_value", filter_value))
|
3664
5175
|
|
3665
|
-
if
|
5176
|
+
if sort_order is not None:
|
3666
5177
|
|
3667
|
-
_query_params.append(("
|
5178
|
+
_query_params.append(("sort_order", sort_order))
|
3668
5179
|
|
3669
|
-
if
|
5180
|
+
if sort_by is not None:
|
3670
5181
|
|
3671
|
-
_query_params.append(("
|
5182
|
+
_query_params.append(("sort_by", sort_by))
|
3672
5183
|
|
3673
|
-
if
|
5184
|
+
if include_deleted is not None:
|
3674
5185
|
|
3675
|
-
_query_params.append(("
|
5186
|
+
_query_params.append(("include_deleted", include_deleted))
|
3676
5187
|
|
3677
|
-
if
|
5188
|
+
if should_validate is not None:
|
3678
5189
|
|
3679
|
-
_query_params.append(("
|
5190
|
+
_query_params.append(("should_validate", should_validate))
|
3680
5191
|
|
3681
5192
|
# process the header parameters
|
3682
5193
|
# process the form parameters
|
@@ -3693,7 +5204,7 @@ class BotsApi:
|
|
3693
5204
|
|
3694
5205
|
return self.api_client.param_serialize(
|
3695
5206
|
method="GET",
|
3696
|
-
resource_path="/bots
|
5207
|
+
resource_path="/bots",
|
3697
5208
|
path_params=_path_params,
|
3698
5209
|
query_params=_query_params,
|
3699
5210
|
header_params=_header_params,
|
@@ -3707,13 +5218,34 @@ class BotsApi:
|
|
3707
5218
|
)
|
3708
5219
|
|
3709
5220
|
@validate_call
|
3710
|
-
def
|
5221
|
+
def get_bots_actions(
|
3711
5222
|
self,
|
3712
|
-
|
3713
|
-
Optional[
|
5223
|
+
sort_order: Annotated[
|
5224
|
+
Optional[StrictStr], Field(description="The order to sort by")
|
3714
5225
|
] = None,
|
3715
|
-
|
3716
|
-
Optional[
|
5226
|
+
sort_by: Annotated[
|
5227
|
+
Optional[StrictStr], Field(description="The field to sort by")
|
5228
|
+
] = None,
|
5229
|
+
filter_by: Annotated[
|
5230
|
+
Optional[StrictStr], Field(description="The field to filter by")
|
5231
|
+
] = None,
|
5232
|
+
filter_value: Annotated[
|
5233
|
+
Optional[StrictStr], Field(description="The value to filter with")
|
5234
|
+
] = None,
|
5235
|
+
page: Annotated[
|
5236
|
+
Optional[StrictInt], Field(description="The current page number")
|
5237
|
+
] = None,
|
5238
|
+
page_size: Annotated[
|
5239
|
+
Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
|
5240
|
+
Field(
|
5241
|
+
description="The number of items per page. Default is 100, max is 1000."
|
5242
|
+
),
|
5243
|
+
] = None,
|
5244
|
+
user_id: Annotated[
|
5245
|
+
Optional[StrictStr],
|
5246
|
+
Field(
|
5247
|
+
description="The ID of the user. Overrides the authenticated user if provided and the user is an admin."
|
5248
|
+
),
|
3717
5249
|
] = None,
|
3718
5250
|
_request_timeout: Union[
|
3719
5251
|
None,
|
@@ -3726,15 +5258,17 @@ class BotsApi:
|
|
3726
5258
|
_content_type: Optional[StrictStr] = None,
|
3727
5259
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
3728
5260
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
3729
|
-
) ->
|
3730
|
-
"""Get Bots
|
3731
|
-
|
3732
|
-
This method can work in both sync and async modes based on the is_sync flag.
|
3733
|
-
"""
|
5261
|
+
) -> PaginatedResponseFuturesTradingAction:
|
5262
|
+
"""Get Bots Actions"""
|
3734
5263
|
if self.is_sync:
|
3735
|
-
return self.
|
3736
|
-
|
3737
|
-
|
5264
|
+
return self._get_bots_actions_sync(
|
5265
|
+
sort_order=sort_order,
|
5266
|
+
sort_by=sort_by,
|
5267
|
+
filter_by=filter_by,
|
5268
|
+
filter_value=filter_value,
|
5269
|
+
page=page,
|
5270
|
+
page_size=page_size,
|
5271
|
+
user_id=user_id,
|
3738
5272
|
_request_timeout=_request_timeout,
|
3739
5273
|
_request_auth=_request_auth,
|
3740
5274
|
_content_type=_content_type,
|
@@ -3743,9 +5277,14 @@ class BotsApi:
|
|
3743
5277
|
)
|
3744
5278
|
|
3745
5279
|
else:
|
3746
|
-
return self.
|
3747
|
-
|
3748
|
-
|
5280
|
+
return self._get_bots_actions_async(
|
5281
|
+
sort_order=sort_order,
|
5282
|
+
sort_by=sort_by,
|
5283
|
+
filter_by=filter_by,
|
5284
|
+
filter_value=filter_value,
|
5285
|
+
page=page,
|
5286
|
+
page_size=page_size,
|
5287
|
+
user_id=user_id,
|
3749
5288
|
_request_timeout=_request_timeout,
|
3750
5289
|
_request_auth=_request_auth,
|
3751
5290
|
_content_type=_content_type,
|
@@ -3754,13 +5293,34 @@ class BotsApi:
|
|
3754
5293
|
)
|
3755
5294
|
|
3756
5295
|
@validate_call
|
3757
|
-
def
|
5296
|
+
def get_bots_actions_with_http_info(
|
3758
5297
|
self,
|
3759
|
-
|
3760
|
-
Optional[
|
5298
|
+
sort_order: Annotated[
|
5299
|
+
Optional[StrictStr], Field(description="The order to sort by")
|
3761
5300
|
] = None,
|
3762
|
-
|
3763
|
-
Optional[
|
5301
|
+
sort_by: Annotated[
|
5302
|
+
Optional[StrictStr], Field(description="The field to sort by")
|
5303
|
+
] = None,
|
5304
|
+
filter_by: Annotated[
|
5305
|
+
Optional[StrictStr], Field(description="The field to filter by")
|
5306
|
+
] = None,
|
5307
|
+
filter_value: Annotated[
|
5308
|
+
Optional[StrictStr], Field(description="The value to filter with")
|
5309
|
+
] = None,
|
5310
|
+
page: Annotated[
|
5311
|
+
Optional[StrictInt], Field(description="The current page number")
|
5312
|
+
] = None,
|
5313
|
+
page_size: Annotated[
|
5314
|
+
Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
|
5315
|
+
Field(
|
5316
|
+
description="The number of items per page. Default is 100, max is 1000."
|
5317
|
+
),
|
5318
|
+
] = None,
|
5319
|
+
user_id: Annotated[
|
5320
|
+
Optional[StrictStr],
|
5321
|
+
Field(
|
5322
|
+
description="The ID of the user. Overrides the authenticated user if provided and the user is an admin."
|
5323
|
+
),
|
3764
5324
|
] = None,
|
3765
5325
|
_request_timeout: Union[
|
3766
5326
|
None,
|
@@ -3773,15 +5333,17 @@ class BotsApi:
|
|
3773
5333
|
_content_type: Optional[StrictStr] = None,
|
3774
5334
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
3775
5335
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
3776
|
-
) -> ApiResponse[
|
3777
|
-
"""Get Bots with HTTP info
|
3778
|
-
|
3779
|
-
This method can work in both sync and async modes based on the is_sync flag.
|
3780
|
-
"""
|
5336
|
+
) -> ApiResponse[PaginatedResponseFuturesTradingAction]:
|
5337
|
+
"""Get Bots Actions with HTTP info"""
|
3781
5338
|
if self.is_sync:
|
3782
|
-
return self.
|
3783
|
-
|
3784
|
-
|
5339
|
+
return self._get_bots_actions_sync_with_http_info(
|
5340
|
+
sort_order=sort_order,
|
5341
|
+
sort_by=sort_by,
|
5342
|
+
filter_by=filter_by,
|
5343
|
+
filter_value=filter_value,
|
5344
|
+
page=page,
|
5345
|
+
page_size=page_size,
|
5346
|
+
user_id=user_id,
|
3785
5347
|
_request_timeout=_request_timeout,
|
3786
5348
|
_request_auth=_request_auth,
|
3787
5349
|
_content_type=_content_type,
|
@@ -3790,9 +5352,14 @@ class BotsApi:
|
|
3790
5352
|
)
|
3791
5353
|
|
3792
5354
|
else:
|
3793
|
-
return self.
|
3794
|
-
|
3795
|
-
|
5355
|
+
return self._get_bots_actions_async_with_http_info(
|
5356
|
+
sort_order=sort_order,
|
5357
|
+
sort_by=sort_by,
|
5358
|
+
filter_by=filter_by,
|
5359
|
+
filter_value=filter_value,
|
5360
|
+
page=page,
|
5361
|
+
page_size=page_size,
|
5362
|
+
user_id=user_id,
|
3796
5363
|
_request_timeout=_request_timeout,
|
3797
5364
|
_request_auth=_request_auth,
|
3798
5365
|
_content_type=_content_type,
|
@@ -3801,13 +5368,34 @@ class BotsApi:
|
|
3801
5368
|
)
|
3802
5369
|
|
3803
5370
|
@validate_call
|
3804
|
-
def
|
5371
|
+
def get_bots_actions_without_preload_content(
|
3805
5372
|
self,
|
3806
|
-
|
3807
|
-
Optional[
|
5373
|
+
sort_order: Annotated[
|
5374
|
+
Optional[StrictStr], Field(description="The order to sort by")
|
3808
5375
|
] = None,
|
3809
|
-
|
3810
|
-
Optional[
|
5376
|
+
sort_by: Annotated[
|
5377
|
+
Optional[StrictStr], Field(description="The field to sort by")
|
5378
|
+
] = None,
|
5379
|
+
filter_by: Annotated[
|
5380
|
+
Optional[StrictStr], Field(description="The field to filter by")
|
5381
|
+
] = None,
|
5382
|
+
filter_value: Annotated[
|
5383
|
+
Optional[StrictStr], Field(description="The value to filter with")
|
5384
|
+
] = None,
|
5385
|
+
page: Annotated[
|
5386
|
+
Optional[StrictInt], Field(description="The current page number")
|
5387
|
+
] = None,
|
5388
|
+
page_size: Annotated[
|
5389
|
+
Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
|
5390
|
+
Field(
|
5391
|
+
description="The number of items per page. Default is 100, max is 1000."
|
5392
|
+
),
|
5393
|
+
] = None,
|
5394
|
+
user_id: Annotated[
|
5395
|
+
Optional[StrictStr],
|
5396
|
+
Field(
|
5397
|
+
description="The ID of the user. Overrides the authenticated user if provided and the user is an admin."
|
5398
|
+
),
|
3811
5399
|
] = None,
|
3812
5400
|
_request_timeout: Union[
|
3813
5401
|
None,
|
@@ -3821,14 +5409,16 @@ class BotsApi:
|
|
3821
5409
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
3822
5410
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
3823
5411
|
) -> RESTResponseType:
|
3824
|
-
"""Get Bots without preloading content
|
3825
|
-
|
3826
|
-
This method can work in both sync and async modes based on the is_sync flag.
|
3827
|
-
"""
|
5412
|
+
"""Get Bots Actions without preloading content"""
|
3828
5413
|
if self.is_sync:
|
3829
|
-
return self.
|
3830
|
-
|
3831
|
-
|
5414
|
+
return self._get_bots_actions_sync_without_preload_content(
|
5415
|
+
sort_order=sort_order,
|
5416
|
+
sort_by=sort_by,
|
5417
|
+
filter_by=filter_by,
|
5418
|
+
filter_value=filter_value,
|
5419
|
+
page=page,
|
5420
|
+
page_size=page_size,
|
5421
|
+
user_id=user_id,
|
3832
5422
|
_request_timeout=_request_timeout,
|
3833
5423
|
_request_auth=_request_auth,
|
3834
5424
|
_content_type=_content_type,
|
@@ -3837,9 +5427,14 @@ class BotsApi:
|
|
3837
5427
|
)
|
3838
5428
|
|
3839
5429
|
else:
|
3840
|
-
return self.
|
3841
|
-
|
3842
|
-
|
5430
|
+
return self._get_bots_actions_async_without_preload_content(
|
5431
|
+
sort_order=sort_order,
|
5432
|
+
sort_by=sort_by,
|
5433
|
+
filter_by=filter_by,
|
5434
|
+
filter_value=filter_value,
|
5435
|
+
page=page,
|
5436
|
+
page_size=page_size,
|
5437
|
+
user_id=user_id,
|
3843
5438
|
_request_timeout=_request_timeout,
|
3844
5439
|
_request_auth=_request_auth,
|
3845
5440
|
_content_type=_content_type,
|
@@ -3849,13 +5444,34 @@ class BotsApi:
|
|
3849
5444
|
|
3850
5445
|
# Private async implementation methods
|
3851
5446
|
@validate_call
|
3852
|
-
async def
|
5447
|
+
async def _get_bots_actions_async(
|
3853
5448
|
self,
|
3854
|
-
|
3855
|
-
Optional[
|
5449
|
+
sort_order: Annotated[
|
5450
|
+
Optional[StrictStr], Field(description="The order to sort by")
|
3856
5451
|
] = None,
|
3857
|
-
|
3858
|
-
Optional[
|
5452
|
+
sort_by: Annotated[
|
5453
|
+
Optional[StrictStr], Field(description="The field to sort by")
|
5454
|
+
] = None,
|
5455
|
+
filter_by: Annotated[
|
5456
|
+
Optional[StrictStr], Field(description="The field to filter by")
|
5457
|
+
] = None,
|
5458
|
+
filter_value: Annotated[
|
5459
|
+
Optional[StrictStr], Field(description="The value to filter with")
|
5460
|
+
] = None,
|
5461
|
+
page: Annotated[
|
5462
|
+
Optional[StrictInt], Field(description="The current page number")
|
5463
|
+
] = None,
|
5464
|
+
page_size: Annotated[
|
5465
|
+
Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
|
5466
|
+
Field(
|
5467
|
+
description="The number of items per page. Default is 100, max is 1000."
|
5468
|
+
),
|
5469
|
+
] = None,
|
5470
|
+
user_id: Annotated[
|
5471
|
+
Optional[StrictStr],
|
5472
|
+
Field(
|
5473
|
+
description="The ID of the user. Overrides the authenticated user if provided and the user is an admin."
|
5474
|
+
),
|
3859
5475
|
] = None,
|
3860
5476
|
_request_timeout: Union[
|
3861
5477
|
None,
|
@@ -3868,14 +5484,25 @@ class BotsApi:
|
|
3868
5484
|
_content_type: Optional[StrictStr] = None,
|
3869
5485
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
3870
5486
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
3871
|
-
) ->
|
3872
|
-
"""Get Bots
|
5487
|
+
) -> PaginatedResponseFuturesTradingAction:
|
5488
|
+
"""Get Bots Actions
|
3873
5489
|
|
5490
|
+
Get all actions for all bots of the user
|
3874
5491
|
|
3875
|
-
:param
|
3876
|
-
:type
|
3877
|
-
:param
|
3878
|
-
:type
|
5492
|
+
:param sort_order: The order to sort by
|
5493
|
+
:type sort_order: str
|
5494
|
+
:param sort_by: The field to sort by
|
5495
|
+
:type sort_by: str
|
5496
|
+
:param filter_by: The field to filter by
|
5497
|
+
:type filter_by: str
|
5498
|
+
:param filter_value: The value to filter with
|
5499
|
+
:type filter_value: str
|
5500
|
+
:param page: The current page number
|
5501
|
+
:type page: int
|
5502
|
+
:param page_size: The number of items per page. Default is 100, max is 1000.
|
5503
|
+
:type page_size: int
|
5504
|
+
:param user_id: The ID of the user. Overrides the authenticated user if provided and the user is an admin.
|
5505
|
+
:type user_id: str
|
3879
5506
|
:param _request_timeout: timeout setting for this request. If one
|
3880
5507
|
number provided, it will be total request
|
3881
5508
|
timeout. It can also be a pair (tuple) of
|
@@ -3898,9 +5525,14 @@ class BotsApi:
|
|
3898
5525
|
:return: Returns the result object.
|
3899
5526
|
""" # noqa: E501
|
3900
5527
|
|
3901
|
-
_param = self.
|
3902
|
-
|
3903
|
-
|
5528
|
+
_param = self._get_bots_actions_serialize(
|
5529
|
+
sort_order=sort_order,
|
5530
|
+
sort_by=sort_by,
|
5531
|
+
filter_by=filter_by,
|
5532
|
+
filter_value=filter_value,
|
5533
|
+
page=page,
|
5534
|
+
page_size=page_size,
|
5535
|
+
user_id=user_id,
|
3904
5536
|
_request_auth=_request_auth,
|
3905
5537
|
_content_type=_content_type,
|
3906
5538
|
_headers=_headers,
|
@@ -3908,7 +5540,7 @@ class BotsApi:
|
|
3908
5540
|
)
|
3909
5541
|
|
3910
5542
|
_response_types_map: Dict[str, Optional[str]] = {
|
3911
|
-
"200": "
|
5543
|
+
"200": "PaginatedResponseFuturesTradingAction",
|
3912
5544
|
}
|
3913
5545
|
response_data = await self.api_client.call_api(
|
3914
5546
|
*_param, _request_timeout=_request_timeout
|
@@ -3920,13 +5552,34 @@ class BotsApi:
|
|
3920
5552
|
).data
|
3921
5553
|
|
3922
5554
|
@validate_call
|
3923
|
-
async def
|
5555
|
+
async def _get_bots_actions_async_with_http_info(
|
3924
5556
|
self,
|
3925
|
-
|
3926
|
-
Optional[
|
5557
|
+
sort_order: Annotated[
|
5558
|
+
Optional[StrictStr], Field(description="The order to sort by")
|
5559
|
+
] = None,
|
5560
|
+
sort_by: Annotated[
|
5561
|
+
Optional[StrictStr], Field(description="The field to sort by")
|
5562
|
+
] = None,
|
5563
|
+
filter_by: Annotated[
|
5564
|
+
Optional[StrictStr], Field(description="The field to filter by")
|
5565
|
+
] = None,
|
5566
|
+
filter_value: Annotated[
|
5567
|
+
Optional[StrictStr], Field(description="The value to filter with")
|
5568
|
+
] = None,
|
5569
|
+
page: Annotated[
|
5570
|
+
Optional[StrictInt], Field(description="The current page number")
|
5571
|
+
] = None,
|
5572
|
+
page_size: Annotated[
|
5573
|
+
Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
|
5574
|
+
Field(
|
5575
|
+
description="The number of items per page. Default is 100, max is 1000."
|
5576
|
+
),
|
3927
5577
|
] = None,
|
3928
|
-
|
3929
|
-
Optional[
|
5578
|
+
user_id: Annotated[
|
5579
|
+
Optional[StrictStr],
|
5580
|
+
Field(
|
5581
|
+
description="The ID of the user. Overrides the authenticated user if provided and the user is an admin."
|
5582
|
+
),
|
3930
5583
|
] = None,
|
3931
5584
|
_request_timeout: Union[
|
3932
5585
|
None,
|
@@ -3939,14 +5592,25 @@ class BotsApi:
|
|
3939
5592
|
_content_type: Optional[StrictStr] = None,
|
3940
5593
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
3941
5594
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
3942
|
-
) -> ApiResponse[
|
3943
|
-
"""Get Bots
|
5595
|
+
) -> ApiResponse[PaginatedResponseFuturesTradingAction]:
|
5596
|
+
"""Get Bots Actions
|
3944
5597
|
|
5598
|
+
Get all actions for all bots of the user
|
3945
5599
|
|
3946
|
-
:param
|
3947
|
-
:type
|
3948
|
-
:param
|
3949
|
-
:type
|
5600
|
+
:param sort_order: The order to sort by
|
5601
|
+
:type sort_order: str
|
5602
|
+
:param sort_by: The field to sort by
|
5603
|
+
:type sort_by: str
|
5604
|
+
:param filter_by: The field to filter by
|
5605
|
+
:type filter_by: str
|
5606
|
+
:param filter_value: The value to filter with
|
5607
|
+
:type filter_value: str
|
5608
|
+
:param page: The current page number
|
5609
|
+
:type page: int
|
5610
|
+
:param page_size: The number of items per page. Default is 100, max is 1000.
|
5611
|
+
:type page_size: int
|
5612
|
+
:param user_id: The ID of the user. Overrides the authenticated user if provided and the user is an admin.
|
5613
|
+
:type user_id: str
|
3950
5614
|
:param _request_timeout: timeout setting for this request. If one
|
3951
5615
|
number provided, it will be total request
|
3952
5616
|
timeout. It can also be a pair (tuple) of
|
@@ -3969,9 +5633,14 @@ class BotsApi:
|
|
3969
5633
|
:return: Returns the result object.
|
3970
5634
|
""" # noqa: E501
|
3971
5635
|
|
3972
|
-
_param = self.
|
3973
|
-
|
3974
|
-
|
5636
|
+
_param = self._get_bots_actions_serialize(
|
5637
|
+
sort_order=sort_order,
|
5638
|
+
sort_by=sort_by,
|
5639
|
+
filter_by=filter_by,
|
5640
|
+
filter_value=filter_value,
|
5641
|
+
page=page,
|
5642
|
+
page_size=page_size,
|
5643
|
+
user_id=user_id,
|
3975
5644
|
_request_auth=_request_auth,
|
3976
5645
|
_content_type=_content_type,
|
3977
5646
|
_headers=_headers,
|
@@ -3979,7 +5648,7 @@ class BotsApi:
|
|
3979
5648
|
)
|
3980
5649
|
|
3981
5650
|
_response_types_map: Dict[str, Optional[str]] = {
|
3982
|
-
"200": "
|
5651
|
+
"200": "PaginatedResponseFuturesTradingAction",
|
3983
5652
|
}
|
3984
5653
|
response_data = await self.api_client.call_api(
|
3985
5654
|
*_param, _request_timeout=_request_timeout
|
@@ -3990,13 +5659,34 @@ class BotsApi:
|
|
3990
5659
|
)
|
3991
5660
|
|
3992
5661
|
@validate_call
|
3993
|
-
async def
|
5662
|
+
async def _get_bots_actions_async_without_preload_content(
|
3994
5663
|
self,
|
3995
|
-
|
3996
|
-
Optional[
|
5664
|
+
sort_order: Annotated[
|
5665
|
+
Optional[StrictStr], Field(description="The order to sort by")
|
3997
5666
|
] = None,
|
3998
|
-
|
3999
|
-
Optional[
|
5667
|
+
sort_by: Annotated[
|
5668
|
+
Optional[StrictStr], Field(description="The field to sort by")
|
5669
|
+
] = None,
|
5670
|
+
filter_by: Annotated[
|
5671
|
+
Optional[StrictStr], Field(description="The field to filter by")
|
5672
|
+
] = None,
|
5673
|
+
filter_value: Annotated[
|
5674
|
+
Optional[StrictStr], Field(description="The value to filter with")
|
5675
|
+
] = None,
|
5676
|
+
page: Annotated[
|
5677
|
+
Optional[StrictInt], Field(description="The current page number")
|
5678
|
+
] = None,
|
5679
|
+
page_size: Annotated[
|
5680
|
+
Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
|
5681
|
+
Field(
|
5682
|
+
description="The number of items per page. Default is 100, max is 1000."
|
5683
|
+
),
|
5684
|
+
] = None,
|
5685
|
+
user_id: Annotated[
|
5686
|
+
Optional[StrictStr],
|
5687
|
+
Field(
|
5688
|
+
description="The ID of the user. Overrides the authenticated user if provided and the user is an admin."
|
5689
|
+
),
|
4000
5690
|
] = None,
|
4001
5691
|
_request_timeout: Union[
|
4002
5692
|
None,
|
@@ -4010,13 +5700,24 @@ class BotsApi:
|
|
4010
5700
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
4011
5701
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
4012
5702
|
) -> RESTResponseType:
|
4013
|
-
"""Get Bots
|
5703
|
+
"""Get Bots Actions
|
4014
5704
|
|
5705
|
+
Get all actions for all bots of the user
|
4015
5706
|
|
4016
|
-
:param
|
4017
|
-
:type
|
4018
|
-
:param
|
4019
|
-
:type
|
5707
|
+
:param sort_order: The order to sort by
|
5708
|
+
:type sort_order: str
|
5709
|
+
:param sort_by: The field to sort by
|
5710
|
+
:type sort_by: str
|
5711
|
+
:param filter_by: The field to filter by
|
5712
|
+
:type filter_by: str
|
5713
|
+
:param filter_value: The value to filter with
|
5714
|
+
:type filter_value: str
|
5715
|
+
:param page: The current page number
|
5716
|
+
:type page: int
|
5717
|
+
:param page_size: The number of items per page. Default is 100, max is 1000.
|
5718
|
+
:type page_size: int
|
5719
|
+
:param user_id: The ID of the user. Overrides the authenticated user if provided and the user is an admin.
|
5720
|
+
:type user_id: str
|
4020
5721
|
:param _request_timeout: timeout setting for this request. If one
|
4021
5722
|
number provided, it will be total request
|
4022
5723
|
timeout. It can also be a pair (tuple) of
|
@@ -4039,9 +5740,14 @@ class BotsApi:
|
|
4039
5740
|
:return: Returns the result object.
|
4040
5741
|
""" # noqa: E501
|
4041
5742
|
|
4042
|
-
_param = self.
|
4043
|
-
|
4044
|
-
|
5743
|
+
_param = self._get_bots_actions_serialize(
|
5744
|
+
sort_order=sort_order,
|
5745
|
+
sort_by=sort_by,
|
5746
|
+
filter_by=filter_by,
|
5747
|
+
filter_value=filter_value,
|
5748
|
+
page=page,
|
5749
|
+
page_size=page_size,
|
5750
|
+
user_id=user_id,
|
4045
5751
|
_request_auth=_request_auth,
|
4046
5752
|
_content_type=_content_type,
|
4047
5753
|
_headers=_headers,
|
@@ -4049,7 +5755,7 @@ class BotsApi:
|
|
4049
5755
|
)
|
4050
5756
|
|
4051
5757
|
_response_types_map: Dict[str, Optional[str]] = {
|
4052
|
-
"200": "
|
5758
|
+
"200": "PaginatedResponseFuturesTradingAction",
|
4053
5759
|
}
|
4054
5760
|
response_data = await self.api_client.call_api(
|
4055
5761
|
*_param, _request_timeout=_request_timeout
|
@@ -4058,13 +5764,34 @@ class BotsApi:
|
|
4058
5764
|
|
4059
5765
|
# Private sync implementation methods
|
4060
5766
|
@validate_call
|
4061
|
-
def
|
5767
|
+
def _get_bots_actions_sync(
|
4062
5768
|
self,
|
4063
|
-
|
4064
|
-
Optional[
|
5769
|
+
sort_order: Annotated[
|
5770
|
+
Optional[StrictStr], Field(description="The order to sort by")
|
4065
5771
|
] = None,
|
4066
|
-
|
4067
|
-
Optional[
|
5772
|
+
sort_by: Annotated[
|
5773
|
+
Optional[StrictStr], Field(description="The field to sort by")
|
5774
|
+
] = None,
|
5775
|
+
filter_by: Annotated[
|
5776
|
+
Optional[StrictStr], Field(description="The field to filter by")
|
5777
|
+
] = None,
|
5778
|
+
filter_value: Annotated[
|
5779
|
+
Optional[StrictStr], Field(description="The value to filter with")
|
5780
|
+
] = None,
|
5781
|
+
page: Annotated[
|
5782
|
+
Optional[StrictInt], Field(description="The current page number")
|
5783
|
+
] = None,
|
5784
|
+
page_size: Annotated[
|
5785
|
+
Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
|
5786
|
+
Field(
|
5787
|
+
description="The number of items per page. Default is 100, max is 1000."
|
5788
|
+
),
|
5789
|
+
] = None,
|
5790
|
+
user_id: Annotated[
|
5791
|
+
Optional[StrictStr],
|
5792
|
+
Field(
|
5793
|
+
description="The ID of the user. Overrides the authenticated user if provided and the user is an admin."
|
5794
|
+
),
|
4068
5795
|
] = None,
|
4069
5796
|
_request_timeout: Union[
|
4070
5797
|
None,
|
@@ -4077,11 +5804,16 @@ class BotsApi:
|
|
4077
5804
|
_content_type: Optional[StrictStr] = None,
|
4078
5805
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
4079
5806
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
4080
|
-
) ->
|
4081
|
-
"""Synchronous version of
|
4082
|
-
return async_to_sync(self.
|
4083
|
-
|
4084
|
-
|
5807
|
+
) -> PaginatedResponseFuturesTradingAction:
|
5808
|
+
"""Synchronous version of get_bots_actions"""
|
5809
|
+
return async_to_sync(self._get_bots_actions_async)(
|
5810
|
+
sort_order=sort_order,
|
5811
|
+
sort_by=sort_by,
|
5812
|
+
filter_by=filter_by,
|
5813
|
+
filter_value=filter_value,
|
5814
|
+
page=page,
|
5815
|
+
page_size=page_size,
|
5816
|
+
user_id=user_id,
|
4085
5817
|
_request_timeout=_request_timeout,
|
4086
5818
|
_request_auth=_request_auth,
|
4087
5819
|
_content_type=_content_type,
|
@@ -4090,13 +5822,34 @@ class BotsApi:
|
|
4090
5822
|
)
|
4091
5823
|
|
4092
5824
|
@validate_call
|
4093
|
-
def
|
5825
|
+
def _get_bots_actions_sync_with_http_info(
|
4094
5826
|
self,
|
4095
|
-
|
4096
|
-
Optional[
|
5827
|
+
sort_order: Annotated[
|
5828
|
+
Optional[StrictStr], Field(description="The order to sort by")
|
4097
5829
|
] = None,
|
4098
|
-
|
4099
|
-
Optional[
|
5830
|
+
sort_by: Annotated[
|
5831
|
+
Optional[StrictStr], Field(description="The field to sort by")
|
5832
|
+
] = None,
|
5833
|
+
filter_by: Annotated[
|
5834
|
+
Optional[StrictStr], Field(description="The field to filter by")
|
5835
|
+
] = None,
|
5836
|
+
filter_value: Annotated[
|
5837
|
+
Optional[StrictStr], Field(description="The value to filter with")
|
5838
|
+
] = None,
|
5839
|
+
page: Annotated[
|
5840
|
+
Optional[StrictInt], Field(description="The current page number")
|
5841
|
+
] = None,
|
5842
|
+
page_size: Annotated[
|
5843
|
+
Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
|
5844
|
+
Field(
|
5845
|
+
description="The number of items per page. Default is 100, max is 1000."
|
5846
|
+
),
|
5847
|
+
] = None,
|
5848
|
+
user_id: Annotated[
|
5849
|
+
Optional[StrictStr],
|
5850
|
+
Field(
|
5851
|
+
description="The ID of the user. Overrides the authenticated user if provided and the user is an admin."
|
5852
|
+
),
|
4100
5853
|
] = None,
|
4101
5854
|
_request_timeout: Union[
|
4102
5855
|
None,
|
@@ -4109,11 +5862,16 @@ class BotsApi:
|
|
4109
5862
|
_content_type: Optional[StrictStr] = None,
|
4110
5863
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
4111
5864
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
4112
|
-
) -> ApiResponse[
|
4113
|
-
"""Synchronous version of
|
4114
|
-
return async_to_sync(self.
|
4115
|
-
|
4116
|
-
|
5865
|
+
) -> ApiResponse[PaginatedResponseFuturesTradingAction]:
|
5866
|
+
"""Synchronous version of get_bots_actions_with_http_info"""
|
5867
|
+
return async_to_sync(self._get_bots_actions_async_with_http_info)(
|
5868
|
+
sort_order=sort_order,
|
5869
|
+
sort_by=sort_by,
|
5870
|
+
filter_by=filter_by,
|
5871
|
+
filter_value=filter_value,
|
5872
|
+
page=page,
|
5873
|
+
page_size=page_size,
|
5874
|
+
user_id=user_id,
|
4117
5875
|
_request_timeout=_request_timeout,
|
4118
5876
|
_request_auth=_request_auth,
|
4119
5877
|
_content_type=_content_type,
|
@@ -4122,13 +5880,34 @@ class BotsApi:
|
|
4122
5880
|
)
|
4123
5881
|
|
4124
5882
|
@validate_call
|
4125
|
-
def
|
5883
|
+
def _get_bots_actions_sync_without_preload_content(
|
4126
5884
|
self,
|
4127
|
-
|
4128
|
-
Optional[
|
5885
|
+
sort_order: Annotated[
|
5886
|
+
Optional[StrictStr], Field(description="The order to sort by")
|
4129
5887
|
] = None,
|
4130
|
-
|
4131
|
-
Optional[
|
5888
|
+
sort_by: Annotated[
|
5889
|
+
Optional[StrictStr], Field(description="The field to sort by")
|
5890
|
+
] = None,
|
5891
|
+
filter_by: Annotated[
|
5892
|
+
Optional[StrictStr], Field(description="The field to filter by")
|
5893
|
+
] = None,
|
5894
|
+
filter_value: Annotated[
|
5895
|
+
Optional[StrictStr], Field(description="The value to filter with")
|
5896
|
+
] = None,
|
5897
|
+
page: Annotated[
|
5898
|
+
Optional[StrictInt], Field(description="The current page number")
|
5899
|
+
] = None,
|
5900
|
+
page_size: Annotated[
|
5901
|
+
Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
|
5902
|
+
Field(
|
5903
|
+
description="The number of items per page. Default is 100, max is 1000."
|
5904
|
+
),
|
5905
|
+
] = None,
|
5906
|
+
user_id: Annotated[
|
5907
|
+
Optional[StrictStr],
|
5908
|
+
Field(
|
5909
|
+
description="The ID of the user. Overrides the authenticated user if provided and the user is an admin."
|
5910
|
+
),
|
4132
5911
|
] = None,
|
4133
5912
|
_request_timeout: Union[
|
4134
5913
|
None,
|
@@ -4142,10 +5921,15 @@ class BotsApi:
|
|
4142
5921
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
4143
5922
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
4144
5923
|
) -> RESTResponseType:
|
4145
|
-
"""Synchronous version of
|
4146
|
-
return async_to_sync(self.
|
4147
|
-
|
4148
|
-
|
5924
|
+
"""Synchronous version of get_bots_actions_without_preload_content"""
|
5925
|
+
return async_to_sync(self._get_bots_actions_async_without_preload_content)(
|
5926
|
+
sort_order=sort_order,
|
5927
|
+
sort_by=sort_by,
|
5928
|
+
filter_by=filter_by,
|
5929
|
+
filter_value=filter_value,
|
5930
|
+
page=page,
|
5931
|
+
page_size=page_size,
|
5932
|
+
user_id=user_id,
|
4149
5933
|
_request_timeout=_request_timeout,
|
4150
5934
|
_request_auth=_request_auth,
|
4151
5935
|
_content_type=_content_type,
|
@@ -4153,10 +5937,15 @@ class BotsApi:
|
|
4153
5937
|
_host_index=_host_index,
|
4154
5938
|
)
|
4155
5939
|
|
4156
|
-
def
|
5940
|
+
def _get_bots_actions_serialize(
|
4157
5941
|
self,
|
4158
|
-
|
4159
|
-
|
5942
|
+
sort_order,
|
5943
|
+
sort_by,
|
5944
|
+
filter_by,
|
5945
|
+
filter_value,
|
5946
|
+
page,
|
5947
|
+
page_size,
|
5948
|
+
user_id,
|
4160
5949
|
_request_auth,
|
4161
5950
|
_content_type,
|
4162
5951
|
_headers,
|
@@ -4178,13 +5967,33 @@ class BotsApi:
|
|
4178
5967
|
|
4179
5968
|
# process the path parameters
|
4180
5969
|
# process the query parameters
|
4181
|
-
if
|
5970
|
+
if sort_order is not None:
|
4182
5971
|
|
4183
|
-
_query_params.append(("
|
5972
|
+
_query_params.append(("sort_order", sort_order))
|
5973
|
+
|
5974
|
+
if sort_by is not None:
|
5975
|
+
|
5976
|
+
_query_params.append(("sort_by", sort_by))
|
5977
|
+
|
5978
|
+
if filter_by is not None:
|
5979
|
+
|
5980
|
+
_query_params.append(("filter_by", filter_by))
|
5981
|
+
|
5982
|
+
if filter_value is not None:
|
5983
|
+
|
5984
|
+
_query_params.append(("filter_value", filter_value))
|
5985
|
+
|
5986
|
+
if page is not None:
|
5987
|
+
|
5988
|
+
_query_params.append(("page", page))
|
5989
|
+
|
5990
|
+
if page_size is not None:
|
5991
|
+
|
5992
|
+
_query_params.append(("page_size", page_size))
|
4184
5993
|
|
4185
|
-
if
|
5994
|
+
if user_id is not None:
|
4186
5995
|
|
4187
|
-
_query_params.append(("
|
5996
|
+
_query_params.append(("user_id", user_id))
|
4188
5997
|
|
4189
5998
|
# process the header parameters
|
4190
5999
|
# process the form parameters
|
@@ -4201,7 +6010,7 @@ class BotsApi:
|
|
4201
6010
|
|
4202
6011
|
return self.api_client.param_serialize(
|
4203
6012
|
method="GET",
|
4204
|
-
resource_path="/bots",
|
6013
|
+
resource_path="/bots/actions",
|
4205
6014
|
path_params=_path_params,
|
4206
6015
|
query_params=_query_params,
|
4207
6016
|
header_params=_header_params,
|
@@ -4256,10 +6065,7 @@ class BotsApi:
|
|
4256
6065
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
4257
6066
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
4258
6067
|
) -> PaginatedResponseOrder:
|
4259
|
-
"""Get Bots Orders
|
4260
|
-
|
4261
|
-
This method can work in both sync and async modes based on the is_sync flag.
|
4262
|
-
"""
|
6068
|
+
"""Get Bots Orders"""
|
4263
6069
|
if self.is_sync:
|
4264
6070
|
return self._get_bots_orders_sync(
|
4265
6071
|
sort_order=sort_order,
|
@@ -4334,10 +6140,7 @@ class BotsApi:
|
|
4334
6140
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
4335
6141
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
4336
6142
|
) -> ApiResponse[PaginatedResponseOrder]:
|
4337
|
-
"""Get Bots Orders with HTTP info
|
4338
|
-
|
4339
|
-
This method can work in both sync and async modes based on the is_sync flag.
|
4340
|
-
"""
|
6143
|
+
"""Get Bots Orders with HTTP info"""
|
4341
6144
|
if self.is_sync:
|
4342
6145
|
return self._get_bots_orders_sync_with_http_info(
|
4343
6146
|
sort_order=sort_order,
|
@@ -4412,10 +6215,7 @@ class BotsApi:
|
|
4412
6215
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
4413
6216
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
4414
6217
|
) -> RESTResponseType:
|
4415
|
-
"""Get Bots Orders without preloading content
|
4416
|
-
|
4417
|
-
This method can work in both sync and async modes based on the is_sync flag.
|
4418
|
-
"""
|
6218
|
+
"""Get Bots Orders without preloading content"""
|
4419
6219
|
if self.is_sync:
|
4420
6220
|
return self._get_bots_orders_sync_without_preload_content(
|
4421
6221
|
sort_order=sort_order,
|
@@ -5056,10 +6856,7 @@ class BotsApi:
|
|
5056
6856
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
5057
6857
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
5058
6858
|
) -> List[OrdersCount]:
|
5059
|
-
"""Get Bots Orders Count
|
5060
|
-
|
5061
|
-
This method can work in both sync and async modes based on the is_sync flag.
|
5062
|
-
"""
|
6859
|
+
"""Get Bots Orders Count"""
|
5063
6860
|
if self.is_sync:
|
5064
6861
|
return self._get_bots_orders_count_sync(
|
5065
6862
|
sort_order=sort_order,
|
@@ -5111,10 +6908,7 @@ class BotsApi:
|
|
5111
6908
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
5112
6909
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
5113
6910
|
) -> ApiResponse[List[OrdersCount]]:
|
5114
|
-
"""Get Bots Orders Count with HTTP info
|
5115
|
-
|
5116
|
-
This method can work in both sync and async modes based on the is_sync flag.
|
5117
|
-
"""
|
6911
|
+
"""Get Bots Orders Count with HTTP info"""
|
5118
6912
|
if self.is_sync:
|
5119
6913
|
return self._get_bots_orders_count_sync_with_http_info(
|
5120
6914
|
sort_order=sort_order,
|
@@ -5166,10 +6960,7 @@ class BotsApi:
|
|
5166
6960
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
5167
6961
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
5168
6962
|
) -> RESTResponseType:
|
5169
|
-
"""Get Bots Orders Count without preloading content
|
5170
|
-
|
5171
|
-
This method can work in both sync and async modes based on the is_sync flag.
|
5172
|
-
"""
|
6963
|
+
"""Get Bots Orders Count without preloading content"""
|
5173
6964
|
if self.is_sync:
|
5174
6965
|
return self._get_bots_orders_count_sync_without_preload_content(
|
5175
6966
|
sort_order=sort_order,
|
@@ -5662,10 +7453,7 @@ class BotsApi:
|
|
5662
7453
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
5663
7454
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
5664
7455
|
) -> List[PnL]:
|
5665
|
-
"""Get Bots Pnl
|
5666
|
-
|
5667
|
-
This method can work in both sync and async modes based on the is_sync flag.
|
5668
|
-
"""
|
7456
|
+
"""Get Bots Pnl"""
|
5669
7457
|
if self.is_sync:
|
5670
7458
|
return self._get_bots_orders_pnl_sync(
|
5671
7459
|
sort_order=sort_order,
|
@@ -5741,10 +7529,7 @@ class BotsApi:
|
|
5741
7529
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
5742
7530
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
5743
7531
|
) -> ApiResponse[List[PnL]]:
|
5744
|
-
"""Get Bots Pnl with HTTP info
|
5745
|
-
|
5746
|
-
This method can work in both sync and async modes based on the is_sync flag.
|
5747
|
-
"""
|
7532
|
+
"""Get Bots Pnl with HTTP info"""
|
5748
7533
|
if self.is_sync:
|
5749
7534
|
return self._get_bots_orders_pnl_sync_with_http_info(
|
5750
7535
|
sort_order=sort_order,
|
@@ -5820,10 +7605,7 @@ class BotsApi:
|
|
5820
7605
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
5821
7606
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
5822
7607
|
) -> RESTResponseType:
|
5823
|
-
"""Get Bots Pnl without preloading content
|
5824
|
-
|
5825
|
-
This method can work in both sync and async modes based on the is_sync flag.
|
5826
|
-
"""
|
7608
|
+
"""Get Bots Pnl without preloading content"""
|
5827
7609
|
if self.is_sync:
|
5828
7610
|
return self._get_bots_orders_pnl_sync_without_preload_content(
|
5829
7611
|
sort_order=sort_order,
|
@@ -6453,10 +8235,7 @@ class BotsApi:
|
|
6453
8235
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
6454
8236
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
6455
8237
|
) -> Bot:
|
6456
|
-
"""Update Bot
|
6457
|
-
|
6458
|
-
This method can work in both sync and async modes based on the is_sync flag.
|
6459
|
-
"""
|
8238
|
+
"""Update Bot"""
|
6460
8239
|
if self.is_sync:
|
6461
8240
|
return self._update_bot_sync(
|
6462
8241
|
id=id,
|
@@ -6496,10 +8275,7 @@ class BotsApi:
|
|
6496
8275
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
6497
8276
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
6498
8277
|
) -> ApiResponse[Bot]:
|
6499
|
-
"""Update Bot with HTTP info
|
6500
|
-
|
6501
|
-
This method can work in both sync and async modes based on the is_sync flag.
|
6502
|
-
"""
|
8278
|
+
"""Update Bot with HTTP info"""
|
6503
8279
|
if self.is_sync:
|
6504
8280
|
return self._update_bot_sync_with_http_info(
|
6505
8281
|
id=id,
|
@@ -6539,10 +8315,7 @@ class BotsApi:
|
|
6539
8315
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
6540
8316
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
6541
8317
|
) -> RESTResponseType:
|
6542
|
-
"""Update Bot without preloading content
|
6543
|
-
|
6544
|
-
This method can work in both sync and async modes based on the is_sync flag.
|
6545
|
-
"""
|
8318
|
+
"""Update Bot without preloading content"""
|
6546
8319
|
if self.is_sync:
|
6547
8320
|
return self._update_bot_sync_without_preload_content(
|
6548
8321
|
id=id,
|