diff --git a/okx/Funding.py b/okx/Funding.py index 179dd0a..39e298b 100644 --- a/okx/Funding.py +++ b/okx/Funding.py @@ -8,6 +8,11 @@ class FundingAPI(OkxClient): def __init__(self, api_key='-1', api_secret_key='-1', passphrase='-1', use_server_time=None, flag='1', domain = 'https://www.okx.com',debug = True, proxy=None): OkxClient.__init__(self, api_key, api_secret_key, passphrase, use_server_time, flag, domain, debug, proxy) + # Get Non Tradable Assets + def get_non_tradable_assets(self, ccy: str = ''): + params = {'ccy': ccy} + return self._request_with_params(GET, NON_TRADABLE_ASSETS, params) + # Get Deposit Address def get_deposit_address(self, ccy): params = {'ccy': ccy} diff --git a/okx/Trade.py b/okx/Trade.py index f5cd0ed..8e52b05 100644 --- a/okx/Trade.py +++ b/okx/Trade.py @@ -124,7 +124,7 @@ class TradeAPI(OkxClient): algoClOrdId=''): params = {'ordType': ordType, 'algoId': algoId, 'instType': instType, 'instId': instId, 'after': after, 'before': before, 'limit': limit, 'algoClOrdId': algoClOrdId} - return self._request_with_params(GET, ORDERS_ALGO_OENDING, params) + return self._request_with_params(GET, ORDERS_ALGO_PENDING, params) # Get Algo Order History def order_algos_history(self, ordType, state='', algoId='', instType='', instId='', after='', before='', limit=''): diff --git a/okx/consts.py b/okx/consts.py index 234bc08..76ac660 100644 --- a/okx/consts.py +++ b/okx/consts.py @@ -56,6 +56,7 @@ ACTIVSTE_OPTION = '/api/v5/account/activate-option' POSITION_BUILDER = '/api/v5/account/position-builder' # funding-complete-testcomplete +NON_TRADABLE_ASSETS = '/api/v5/asset/non-tradable-assets' DEPOSIT_ADDRESS = '/api/v5/asset/deposit-address' GET_BALANCES = '/api/v5/asset/balances' FUNDS_TRANSFER = '/api/v5/asset/transfer' @@ -153,7 +154,7 @@ ORDERS_FILLS_HISTORY = '/api/v5/trade/fills-history' PLACE_ALGO_ORDER = '/api/v5/trade/order-algo' CANCEL_ALGOS = '/api/v5/trade/cancel-algos' Cancel_Advance_Algos = '/api/v5/trade/cancel-advance-algos' -ORDERS_ALGO_OENDING = '/api/v5/trade/orders-algo-pending' +ORDERS_ALGO_PENDING = '/api/v5/trade/orders-algo-pending' ORDERS_ALGO_HISTORY = '/api/v5/trade/orders-algo-history' GET_ALGO_ORDER_DETAILS = '/api/v5/trade/order-algo' AMEND_ALGO_ORDER = '/api/v5/trade/amend-algos' diff --git a/okx/okxclient.py b/okx/okxclient.py index fa44488..f4f9ff5 100644 --- a/okx/okxclient.py +++ b/okx/okxclient.py @@ -1,5 +1,6 @@ import json import warnings +from datetime import datetime, timezone import httpx from httpx import Client