Merge remote-tracking branch 'origin/master'
# Conflicts: # okx/okxclient.py
This commit is contained in:
commit
ef7e4f3a21
|
|
@ -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):
|
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)
|
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
|
# Get Deposit Address
|
||||||
def get_deposit_address(self, ccy):
|
def get_deposit_address(self, ccy):
|
||||||
params = {'ccy': ccy}
|
params = {'ccy': ccy}
|
||||||
|
|
|
||||||
|
|
@ -124,7 +124,7 @@ class TradeAPI(OkxClient):
|
||||||
algoClOrdId=''):
|
algoClOrdId=''):
|
||||||
params = {'ordType': ordType, 'algoId': algoId, 'instType': instType, 'instId': instId, 'after': after,
|
params = {'ordType': ordType, 'algoId': algoId, 'instType': instType, 'instId': instId, 'after': after,
|
||||||
'before': before, 'limit': limit, 'algoClOrdId': algoClOrdId}
|
'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
|
# Get Algo Order History
|
||||||
def order_algos_history(self, ordType, state='', algoId='', instType='', instId='', after='', before='', limit=''):
|
def order_algos_history(self, ordType, state='', algoId='', instType='', instId='', after='', before='', limit=''):
|
||||||
|
|
|
||||||
|
|
@ -56,6 +56,7 @@ ACTIVSTE_OPTION = '/api/v5/account/activate-option'
|
||||||
POSITION_BUILDER = '/api/v5/account/position-builder'
|
POSITION_BUILDER = '/api/v5/account/position-builder'
|
||||||
|
|
||||||
# funding-complete-testcomplete
|
# funding-complete-testcomplete
|
||||||
|
NON_TRADABLE_ASSETS = '/api/v5/asset/non-tradable-assets'
|
||||||
DEPOSIT_ADDRESS = '/api/v5/asset/deposit-address'
|
DEPOSIT_ADDRESS = '/api/v5/asset/deposit-address'
|
||||||
GET_BALANCES = '/api/v5/asset/balances'
|
GET_BALANCES = '/api/v5/asset/balances'
|
||||||
FUNDS_TRANSFER = '/api/v5/asset/transfer'
|
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'
|
PLACE_ALGO_ORDER = '/api/v5/trade/order-algo'
|
||||||
CANCEL_ALGOS = '/api/v5/trade/cancel-algos'
|
CANCEL_ALGOS = '/api/v5/trade/cancel-algos'
|
||||||
Cancel_Advance_Algos = '/api/v5/trade/cancel-advance-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'
|
ORDERS_ALGO_HISTORY = '/api/v5/trade/orders-algo-history'
|
||||||
GET_ALGO_ORDER_DETAILS = '/api/v5/trade/order-algo'
|
GET_ALGO_ORDER_DETAILS = '/api/v5/trade/order-algo'
|
||||||
AMEND_ALGO_ORDER = '/api/v5/trade/amend-algos'
|
AMEND_ALGO_ORDER = '/api/v5/trade/amend-algos'
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
import json
|
import json
|
||||||
import warnings
|
import warnings
|
||||||
|
from datetime import datetime, timezone
|
||||||
|
|
||||||
import httpx
|
import httpx
|
||||||
from httpx import Client
|
from httpx import Client
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue