Merge remote-tracking branch 'origin/master'

# Conflicts:
#	okx/okxclient.py
This commit is contained in:
007live 2024-05-09 16:22:19 +08:00
commit ef7e4f3a21
4 changed files with 9 additions and 2 deletions

View File

@ -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}

View File

@ -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=''):

View File

@ -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'

View File

@ -1,5 +1,6 @@
import json
import warnings
from datetime import datetime, timezone
import httpx
from httpx import Client