# -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.async_support.base.exchange import Exchange
# -----------------------------------------------------------------------------
try:
basestring # Python 3
except NameError:
basestring = str # Python 2
import hashlib
from ccxt.base.errors import ExchangeError
from ccxt.base.errors import AuthenticationError
from ccxt.base.errors import PermissionDenied
from ccxt.base.errors import AccountSuspended
from ccxt.base.errors import ArgumentsRequired
from ccxt.base.errors import BadRequest
from ccxt.base.errors import BadSymbol
from ccxt.base.errors import InsufficientFunds
from ccxt.base.errors import InvalidAddress
from ccxt.base.errors import InvalidOrder
from ccxt.base.errors import OrderNotFound
from ccxt.base.errors import CancelPending
from ccxt.base.errors import NotSupported
from ccxt.base.errors import DDoSProtection
from ccxt.base.errors import ExchangeNotAvailable
from ccxt.base.errors import OnMaintenance
from ccxt.base.errors import InvalidNonce
from ccxt.base.errors import RequestTimeout
from ccxt.base.decimal_to_precision import TRUNCATE
from ccxt.base.decimal_to_precision import TICK_SIZE
class okex(Exchange):
def describe(self):
return self.deep_extend(super(okex, self).describe(), {
'id': 'okex',
'name': 'OKEX',
'countries': ['CN', 'US'],
'version': 'v3',
'rateLimit': 1000, # up to 3000 requests per 5 minutes ≈ 600 requests per minute ≈ 10 requests per second ≈ 100 ms
'pro': True,
'has': {
'CORS': False,
'fetchOHLCV': True,
'fetchOrder': True,
'fetchOrders': False,
'fetchOpenOrders': True,
'fetchClosedOrders': True,
'fetchCurrencies': False, # see below
'fetchDeposits': True,
'fetchWithdrawals': True,
'fetchTime': True,
'fetchTransactions': False,
'fetchMyTrades': True,
'fetchDepositAddress': True,
'fetchOrderTrades': True,
'fetchTickers': True,
'fetchLedger': True,
'withdraw': True,
'futures': True,
},
'timeframes': {
'1m': '60',
'3m': '180',
'5m': '300',
'15m': '900',
'30m': '1800',
'1h': '3600',
'2h': '7200',
'4h': '14400',
'6h': '21600',
'12h': '43200',
'1d': '86400',
'1w': '604800',
},
'hostname': 'okex.com',
'urls': {
'logo': 'https://user-images.githubusercontent.com/1294454/32552768-0d6dd3c6-c4a6-11e7-90f8-c043b64756a7.jpg',
'api': {
'rest': 'https://www.{hostname}',
},
'www': 'https://www.okex.com',
'doc': 'https://www.okex.com/docs/en/',
'fees': 'https://www.okex.com/pages/products/fees.html',
'referral': 'https://www.okex.com/join/1888677',
'test': {
'rest': 'https://testnet.okex.com',
},
},
'api': {
'general': {
'get': [
'time',
],
},
'account': {
'get': [
'wallet',
'sub-account',
'asset-valuation',
'wallet/{currency}',
'withdrawal/history',
'withdrawal/history/{currency}',
'ledger',
'deposit/address',
'deposit/history',
'deposit/history/{currency}',
'currencies',
'withdrawal/fee',
],
'post': [
'transfer',
'withdrawal',
],
},
'spot': {
'get': [
'accounts',
'accounts/{currency}',
'accounts/{currency}/ledger',
'orders',
'orders_pending',
'orders/{order_id}',
'orders/{client_oid}',
'trade_fee',
'fills',
'algo',
# public
'instruments',
'instruments/{instrument_id}/book',
'instruments/ticker',
'instruments/{instrument_id}/ticker',
'instruments/{instrument_id}/trades',
'instruments/{instrument_id}/candles',
],
'post': [
'order_algo',
'orders',
'batch_orders',
'cancel_orders/{order_id}',
'cancel_orders/{client_oid}',
'cancel_batch_algos',
'cancel_batch_orders',
],
},
'margin': {
'get': [
'accounts',
'accounts/{instrument_id}',
'accounts/{instrument_id}/ledger',
'accounts/availability',
'accounts/{instrument_id}/availability',
'accounts/borrowed',
'accounts/{instrument_id}/borrowed',
'orders',
'accounts/{instrument_id}/leverage',
'orders/{order_id}',
'orders/{client_oid}',
'orders_pending',
'fills',
# public
'instruments/{instrument_id}/mark_price',
],
'post': [
'accounts/borrow',
'accounts/repayment',
'orders',
'batch_orders',
'cancel_orders',
'cancel_orders/{order_id}',
'cancel_orders/{client_oid}',
'cancel_batch_orders',
'accounts/{instrument_id}/leverage',
],
},
'futures': {
'get': [
'position',
'{instrument_id}/position',
'accounts',
'accounts/{underlying}',
'accounts/{underlying}/leverage',
'accounts/{underlying}/ledger',
'order_algo/{instrument_id}',
'orders/{instrument_id}',
'orders/{instrument_id}/{order_id}',
'orders/{instrument_id}/{client_oid}',
'fills',
'trade_fee',
'accounts/{instrument_id}/holds',
'order_algo/{instrument_id}',
# public
'instruments',
'instruments/{instrument_id}/book',
'instruments/ticker',
'instruments/{instrument_id}/ticker',
'instruments/{instrument_id}/trades',
没有合适的资源?快使用搜索试试~ 我知道了~
基于Python/JavaScript的数字货币量化交易策略
共413个文件
py:270个
pyc:138个
md:4个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 124 浏览量
2024-05-09
19:52:19
上传
评论 2
收藏 2.36MB ZIP 举报
温馨提示
策略在运行之前将文件名改为英文,为了方便大家理解我特意改成的中文 Thor Strategy Library策略可运行的数字货币交易所(其他交易所也可适配后运行) * BitMEX :数字货币期货、永续合约 * Bybit :数字货币永续合约 * Binance :数字货币现货 * Binance永续 :数字货币永续合约 * OKEX :数字货币现货 * OKEX永续 :数字货币永续合约 * OKEX期货 :数字货币期货 * Huobi :数字货币现货 * Huobi期货 :数字货币期货 * Huobi永续 :数字货币永续 * Bitfinex :数字货币现货 * Coinbase :数字货币现货 * Bitstamp :数字货币现货
资源推荐
资源详情
资源评论
收起资源包目录
基于Python/JavaScript的数字货币量化交易策略 (413个子文件)
手动API下单.js 8KB
README.md 2KB
README.md 1KB
README.md 37B
README.md 18B
okex.py 143KB
okex.py 142KB
exmo.py 89KB
exmo.py 89KB
bybit.py 85KB
binance.py 85KB
bybit.py 84KB
binance.py 84KB
exchange.py 81KB
hbtc.py 78KB
hbtc.py 77KB
deribit.py 74KB
deribit.py 73KB
stex.py 73KB
stex.py 72KB
kucoin.py 67KB
kucoin.py 67KB
qtrade.py 62KB
qtrade.py 62KB
kraken.py 62KB
kraken.py 61KB
upbit.py 59KB
upbit.py 59KB
bittrex.py 58KB
bittrex.py 58KB
huobipro.py 57KB
huobipro.py 56KB
ftx.py 55KB
ftx.py 54KB
poloniex.py 54KB
poloniex.py 53KB
bytetrade.py 52KB
bytetrade.py 52KB
bitmex.py 51KB
bitmex.py 50KB
coinbase.py 50KB
coinbase.py 50KB
crex24.py 50KB
timex.py 50KB
crex24.py 50KB
timex.py 49KB
bitbay.py 49KB
anxpro.py 49KB
bitbay.py 49KB
bw.py 49KB
anxpro.py 49KB
bw.py 49KB
probit.py 48KB
bitz.py 48KB
therock.py 48KB
probit.py 48KB
bitz.py 48KB
therock.py 48KB
bitmax.py 47KB
bitmax.py 47KB
bigone.py 46KB
bitfinex2.py 46KB
bigone.py 46KB
cex.py 46KB
bitfinex2.py 46KB
cex.py 46KB
bitfinex.py 44KB
bitfinex.py 43KB
hollaex.py 43KB
hollaex.py 42KB
digifinex.py 42KB
hitbtc.py 42KB
digifinex.py 42KB
hitbtc.py 42KB
dsx.py 41KB
bitstamp.py 41KB
bitstamp.py 41KB
dsx.py 41KB
idex.py 41KB
eterbase.py 40KB
idex.py 40KB
aofex.py 40KB
eterbase.py 40KB
aofex.py 40KB
theocean.py 37KB
theocean.py 37KB
bitmart.py 36KB
coss.py 36KB
bcex.py 36KB
coss.py 36KB
bitmart.py 36KB
bcex.py 35KB
liquid.py 35KB
liquid.py 35KB
gateio.py 35KB
coinbasepro.py 35KB
yobit.py 35KB
gateio.py 34KB
yobit.py 34KB
coinbasepro.py 34KB
共 413 条
- 1
- 2
- 3
- 4
- 5
资源评论
hakesashou
- 粉丝: 4455
- 资源: 1244
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功