ccxt

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Ccxt Skill

CCXT 技能文档

Comprehensive assistance with ccxt development, generated from official documentation.
为CCXT开发提供全面支持,内容源自官方文档。

When to Use This Skill

何时使用本技能

This skill should be triggered when:
  • Working with ccxt
  • Asking about ccxt features or APIs
  • Implementing ccxt solutions
  • Debugging ccxt code
  • Learning ccxt best practices
当你遇到以下场景时,可使用本技能:
  • 进行CCXT相关开发
  • 咨询CCXT功能或API相关问题
  • 实现基于CCXT的解决方案
  • 调试CCXT代码
  • 学习CCXT最佳实践

Quick Reference

快速参考

Common Patterns

常见模式

Pattern 1: Frequently Asked Questions I'm trying to run the code, but it's not working, how do I fix it? If your question is formulated in a short manner like the above, we won't help. We don't teach programming. If you're unable to read and understand the Manual or you can't follow precisely the guides from the CONTRIBUTING doc on how to report an issue, we won't help either. Read the CONTRIBUTING guides on how to report an issue and read the Manual. You should not risk anyone's money and time without reading the entire Manual very carefully. You should not risk anything if you're not used to a lot of reading with tons of details. Also, if you don't have the confidence with the programming language you're using, there are much better places for coding fundamentals and practice. Search for python tutorials, js videos, play with examples, this is how other people climb up the learning curve. No shortcuts, if you want to learn something. What is required to get help? When asking a question: Use the search button for duplicates first! Post your request and response in verbose mode! Add exchange.verbose = true right before the line you're having issues with, and copypaste what you see on your screen. It's written and mentioned everywhere, in the Troubleshooting section, in the README and in many answers to similar questions among previous issues and pull requests. No excuses. The verbose output should include both the request and response from the exchange. Include the full error callstack! Write your programming language and language version number Write the CCXT / CCXT Pro library version number Which exchange it is Which method you're trying to call Post your code to reproduce the problem. Make it a complete short runnable program, don't swallow the lines and make it as compact as you can (5-10 lines of code), including the exchange instantation code. Remove all irrelevant parts from it, leaving just the essence of the code to reproduce the issue. DON'T POST SCREENSHOTS OF CODE OR ERRORS, POST THE OUTPUT AND CODE IN PLAIN TEXT! Surround code and output with triple backticks:
GOOD
. Don't confuse the backtick symbol (
) with the quote symbol ('): '''BAD''' Don't confuse a single backtick with triple backticks: 
BAD
 DO NOT POST YOUR apiKey AND secret! Keep them safe (remove them before posting)! I am calling a method and I get an error, what am I doing wrong? You're not reporting the issue properly ) Please, help the community to help you ) Read this and follow the steps: https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-submit-an-issue. Once again, your code to reproduce the issue and your verbose request and response ARE REQUIRED. Just the error traceback, or just the response, or just the request, or just the code – is not enough! I got an incorrect result from a method call, can you help? Basically the same answer as the previous question. Read and follow precisely: https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-submit-an-issue. Once again, your code to reproduce the issue and your verbose request and response ARE REQUIRED. Just the error traceback, or just the response, or just the request, or just the code – is not enough! Can you implement feature foo in exchange bar? Yes, we can. And we will, if nobody else does that before us. There's very little point in asking this type of questions, because the answer is always positive. When someone asks if we can do this or that, the question is not about our abilities, it all boils down to time and management needed for implementing all accumulated feature requests. Moreover, this is an open-source library which is a work in progress. This means, that this project is intended to be developed by the community of users, who are using it. What you're asking is not whether we can or cannot implement it, in fact you're actually telling us to go do that particular task and this is not how we see a voluntary collaboration. Your contributions, PRs and commits are welcome: https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code. We don't give promises or estimates on the free open-source work. If you wish to speed it up, feel free to reach out to us via info@ccxt.trade. When will you add feature foo for exchange bar ? What's the estimated time? When should we expect this? We don't give promises or estimates on the open-source work. The reasoning behind this is explained in the previous paragraph. When will you add the support for an exchange requested in the Issues? Again, we can't promise on the dates for adding this or that exchange, due to reasons outlined above. The answer will always remain the same: as soon as we can. How long should I wait for a feature to be added? I need to decide whether to implement it myself or to wait for the CCXT Dev Team to implement it for me. Please, go for implemeting it yourself, do not wait for us. We will add it as soon as we can. Also, your contributions are very welcome: https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code What's your progress on adding the feature foo that was requested earlier? How do you do implementing exchange bar? This type of questions is usually a waste of time, because answering it usually requires too much time for context-switching, and it often takes more time to answer this question, than to actually satisfy the request with code for a new feature or a new exchange. The progress of this open-source project is also open, so, whenever you're wondering how it is doing, take a look into commit history. What is the status of this PR? Any update? If it is not merged, it means that the PR contains errors, that should be fixed first. If it could be merged as is – we would merge it, and you wouldn't have asked this question in the first place. The most frequent reason for not merging a PR is a violation of any of the CONTRIBUTING guidelines. Those guidelines should be taken literally, cannot skip a single line or word from there if you want your PR to be merged quickly. Code contributions that do not break the guidelines get merged almost immediately (usually, within hours). Can you point out the errors or what should I edit in my PR to get it merged into master branch? Unfortunately, we don't always have the time to quickly list out each and every single error in the code that prevents it from merging. It is often easier and faster to just go and fix the error rather than explain what one should do to fix it. Most of them are already outlined in the CONTRIBUTING guidelines. The main rule of thumb is to follow all guidelines literally. Hey! The fix you've uploaded is in TypeScript, would you fix JavaScript / Python / PHP as well, please? Our build system generates exchange-specific JavaScript, Python and PHP code for us automatically, so it is transpiled from TypeScript, and there's no need to fix all languages separately one by one. Thus, if it is fixed in TypeScript, it is fixed in JavaScript NPM, Python pip and PHP Composer as well. The automatic build usually takes 15-20 minutes. Just upgrade your version with npm, pip or composer after the new version arrives and you'll be fine. More about it here: https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#multilanguage-support https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#transpiled-generated-files How to create an order with takeProfit+stopLoss? Some exchanges support createOrder with the additional "attached" stopLoss & takeProfit sub-orders - view StopLoss And TakeProfit Orders Attached To A Position. However, some exchanges might not support that feature and you will need to run separate createOrder methods to add conditional order (e.g. *trigger order | stoploss order | takeprofit order) to the already open position - view [Conditional orders](Manual.md#Conditional Orders). You can also check them by looking at exchange.has['createOrderWithTakeProfitAndStopLoss'], exchange.has['createStopLossOrder'] and exchange.has['createTakeProfitOrder'], however they are not as precise as .features property. How to create a spot market buy with cost? To create a market-buy order with cost, first, you need to check if the exchange supports that feature (exchange.has['createMarketBuyOrderWithCost']). If it does, then you can use the createMarketBuyOrderWithCost
method. Example: order = await exchange.createMarketBuyOrderWithCost(symbol, cost) What does the createMarketBuyRequiresPrice option mean? Many exchanges require the amount to be in the quote currency (they don't accept the base amount) when placing spot-market buy orders. In those cases, the exchange will have the option createMarketBuyRequiresPrice set to true. Example: If you wanted to buy BTC/USDT with a market buy-order, you would need to provide an amount = 5 USDT instead of 0.000X. We have a check to prevent errors that explicitly require the price because users will usually provide the amount in the base currency. So by default, if you do, create_order(symbol, 'market,' 'buy,' 10) will throw an error if the exchange has that option (createOrder() requires the price argument for market buy orders to calculate the total cost to spend (amount * price), alternatively set the createMarketBuyOrderRequiresPrice option or param to false...). If the exchange requires the cost and the user provided the base amount, we need to request an extra parameter price and multiply them to get the cost. If you're aware of this behavior, you can simply disable createMarketBuyOrderRequiresPrice and pass the cost in the amount parameter, but disabling it does not mean you can place the order using the base amount instead of the quote. If you do create_order(symbol, 'market', 'buy', 0.001, 20000) ccxt will use the required price to calculate the cost by doing 0.01*20000 and send that value to the exchange. If you want to provide the cost directly in the amount argument, you can do exchange.options['createMarketBuyOrderRequiresPrice'] = False (you acknowledge that the amount will be the cost for market-buy) and then you can do create_order(symbol, 'market', 'buy', 10) This is basically to avoid a user doing this: create_order('SHIB/USDT', market, buy, 1000000) and thinking he's trying to buy 1kk of shib but in reality he's buying 1kk USDT worth of SHIB. For that reason, by default ccxt always accepts the base currency in the amount parameter. Alternatively, you can use the functions createMarketBuyOrderWithCost/ createMarketSellOrderWithCost if they are available. See more: Market Buys What's the difference between trading spot and swap/perpetual futures? Spot trading involves buying or selling a financial instrument (like a cryptocurrency) for immediate delivery. It's straightforward, involving the direct exchange of assets. Swap trading, on the other hand, involves derivative contracts where two parties exchange financial instruments or cash flows at a set date in the future, based on the underlying asset. Swaps are often used for leverage, speculation, or hedging and do not necessarily involve the exchange of the underlying asset until the contract expires. Besides that, you will be handling contracts if you're trading swaps and not the base currency (e.g., BTC) directly, so if you create an order with amount = 1, the amount in BTC will vary depending on the contractSize. You can check the contract size by doing: await exchange.loadMarkets() symbol = 'XRP/USDT:USDT' market = exchange.market(symbol) print(market['contractSize']) How to place a reduceOnly order? A reduceOnly order is a type of order that can only reduce a position, not increase it. To place a reduceOnly order, you typically use the createOrder method with a reduceOnly parameter set to true. This ensures that the order will only execute if it decreases the size of an open position, and it will either partially fill or not fill at all if executing it would increase the position size. Javascript const params = { 'reduceOnly': true, // set to true if you want to close a position, set to false if you want to open a new position } const order = await exchange.createOrder (symbol, type, side, amount, price, params) Python params = { 'reduceOnly': True, # set to True if you want to close a position, set to False if you want to open a new position } order = exchange.create_order (symbol, type, side, amount, price, params) PHP $params = { 'reduceOnly': true, // set to true if you want to close a position, set to false if you want to open a new position } $order = $exchange->create_order ($symbol, $type, $side, $amount, $price, $params); See more: Trailing Orders How to check the endpoint used by the unified method? To check the endpoint used by a unified method in the CCXT library, you would typically need to refer to the source code of the library for the specific exchange implementation you're interested in. The unified methods in CCXT abstract away the details of the specific endpoints they interact with, so this information is not directly exposed via the library's API. For detailed inspection, you can look at the implementation of the method for the particular exchange in the CCXT library's source code on GitHub. See more: Unified API How to differentiate between previousFundingRate, fundingRate and nextFundingRate in the funding rate structure? The funding rate structure has three different funding rate values that can be returned: previousFundingRaterefers to the most recently completed rate. fundingRate is the upcoming rate. This value is always changing until the funding time passes and then it becomes the previousFundingRate. nextFundingRate is only supported on a few exchanges and is the predicted funding rate after the upcoming rate. This value is two funding rates from now. As an example, say it is 12:30. The previousFundingRate happened at 12:00 and we're looking to see what the upcoming funding rate will be by checking the fundingRate value. In this example, given 4-hour intervals, the fundingRate will happen in the future at 4:00 and the nextFundingRate is the predicted rate that will happen at 8:00.
python tutorials
Pattern 2: To create a market-buy order with cost, first, you need to check if the exchange supports that feature (exchange.has['createMarketBuyOrderWithCost']). If it does, then you can use the createMarketBuyOrderWithCost` method. Example:
exchange.has['createMarketBuyOrderWithCost']). If it does, then you can use the
Pattern 3: Example: If you wanted to buy BTC/USDT with a market buy-order, you would need to provide an amount = 5 USDT instead of 0.000X. We have a check to prevent errors that explicitly require the price because users will usually provide the amount in the base currency.
create_order(symbol, 'market,' 'buy,' 10)
Pattern 4: For a complete list of all exchanges and their supported methods, please, refer to this example: https://github.com/ccxt/ccxt/blob/master/examples/js/exchange-capabilities.js
exchange.rateLimit
Pattern 5: The ccxt library supports asynchronous concurrency mode in Python 3.5+ with async/await syntax. The asynchronous Python version uses pure asyncio with aiohttp. In async mode you have all the same properties and methods, but most methods are decorated with an async keyword. If you want to use async mode, you should link against the ccxt.async_support subpackage, like in the following example:
ccxt.async_support
模式1:常见问题 我运行代码时出错了,该怎么修复? 如果你的问题像上面这样表述过于简短,我们无法提供帮助。我们不教授基础编程知识。如果你无法阅读并理解手册,或者无法严格遵循CONTRIBUTING文档中关于提交问题的指南,我们也无法提供帮助。请阅读CONTRIBUTING指南了解如何提交问题,并仔细阅读手册。在未仔细通读完整手册的情况下,不要轻易冒险投入资金和时间。如果你不习惯阅读大量细节内容,也不要轻易尝试。另外,如果你对使用的编程语言不够熟悉,有很多更好的地方可以学习编程基础和练习。搜索Python教程、JavaScript视频,尝试示例代码,这是其他人提升技能的方式。学习没有捷径。
获得帮助需要满足什么条件? 提问时:
  1. 先使用搜索功能查找是否有重复问题!
  2. 以详细模式发布你的请求和响应! 在出现问题的代码行前添加
    exchange.verbose = true
    ,然后复制屏幕上显示的内容。这在故障排除部分、README以及过往问题和拉取请求的众多类似回答中都有提及,没有借口不这么做。详细输出应包含请求和响应的完整内容。
  3. 附上完整的错误调用栈!
  4. 说明你使用的编程语言及其版本号
  5. 说明CCXT/CCXT Pro库的版本号
  6. 说明涉及的交易所
  7. 说明你尝试调用的方法
  8. 提供可复现问题的代码。确保是完整的可运行短程序(5-10行代码),包含交易所实例化代码。移除所有无关内容,只保留复现问题的核心代码。
  9. 不要发布代码或错误的截图!请以纯文本形式发布输出和代码!
  10. 用三个反引号包裹代码和输出:
    GOOD
    。不要将反引号(
    )和单引号(')混淆:'''BAD''',也不要用单个反引号代替三个反引号:
    BAD`
  11. 不要泄露你的apiKey和secret!请妥善保管(发布前删除它们)!
我调用某个方法时出错了,哪里出问题了? 你没有按照正确的方式提交问题 😊 请帮助社区更好地帮助你 😊 阅读并遵循以下步骤:https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-submit-an-issue。再次强调,必须提供可复现问题的代码以及详细的请求和响应内容。仅提供错误栈、仅响应、仅请求或仅代码都是不够的!
你们能为交易所Bar实现功能Foo吗? 可以。如果没有其他人先实现,我们会完成这个功能。这类问题其实意义不大,因为答案永远是肯定的。当有人问我们能否实现某个功能时,问题的本质不在于我们的能力,而在于实现所有累积的功能请求所需的时间和管理成本。此外,这是一个开源的持续开发项目,意味着该项目旨在由使用它的用户社区共同开发。你问的不是我们能不能实现,实际上是在要求我们去完成这个特定任务,但这并非我们所认为的自愿协作方式。我们非常欢迎你的贡献、PR和提交:https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code。对于免费的开源工作,我们不做承诺或提供时间预估。如果你希望加快进度,可以通过info@ccxt.trade联系我们。
你们什么时候会为交易所Bar添加功能Foo?预计需要多长时间?我们什么时候能等到? 对于开源工作,我们不做承诺或提供时间预估。原因在上一段已经说明。
你们什么时候会添加Issues中请求的交易所支持? 同样,由于上述原因,我们无法承诺添加某个交易所的具体日期。答案永远是:尽快。
我需要等多久才能等到某个功能上线?我得决定是自己实现还是等CCXT开发团队来做。 请你自己动手实现,不要等我们。我们会尽快添加该功能。另外,非常欢迎你的贡献:https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
之前请求的功能Foo进展如何?交易所Bar的实现情况怎么样? 这类问题通常是浪费时间,因为回答它通常需要大量的上下文切换时间,而且回答问题的时间往往比实际实现新功能或新交易所的时间还要长。这个开源项目的进展是公开的,所以当你想了解情况时,可以查看提交历史。
这个PR的状态如何?有更新吗? 如果PR还没有被合并,说明它存在需要先修复的错误。如果可以直接合并,我们早就合并了,你也不会问这个问题。PR未被合并最常见的原因是违反了CONTRIBUTING指南中的任意一条。这些指南必须严格遵守,如果你想让PR快速合并,不要跳过其中任何一行或一个字。符合指南的代码贡献几乎会立即被合并(通常在几小时内)。
你们能指出我的PR中需要修改的错误,好让它合并到主分支吗? 遗憾的是,我们并不总是有时间快速列出代码中所有阻止合并的错误。通常直接修复错误比解释如何修复更容易。大多数错误在CONTRIBUTING指南中已经有说明。基本原则是严格遵守所有指南。
嘿!你们上传的修复是TypeScript版本的,能也修复JavaScript/Python/PHP版本吗? 我们的构建系统会自动从TypeScript生成各交易所对应的JavaScript、Python和PHP代码,因此无需分别修复所有语言版本。也就是说,如果TypeScript版本修复了问题,那么JavaScript NPM、Python pip和PHP Composer版本也会同步修复。自动构建通常需要15-20分钟。等新版本发布后,只需通过npm、pip或composer升级你的库版本即可。更多信息请查看:https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#multilanguage-support https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#transpiled-generated-files
如何创建带有止盈(takeProfit)和止损(stopLoss)的订单? 部分交易所支持在createOrder中附加止盈和止损子订单——请查看“与头寸关联的止损和止盈订单”。不过,有些交易所可能不支持该功能,你需要单独调用createOrder方法,为已开仓的头寸添加条件订单(例如:触发订单 | 止损订单 | 止盈订单)——请查看[条件订单](Manual.md#Conditional Orders)。你也可以通过
exchange.has['createOrderWithTakeProfitAndStopLoss']
exchange.has['createStopLossOrder']
exchange.has['createTakeProfitOrder']
来检查,但它们不如
.features
属性准确。
如何创建指定金额(cost)的现货市价买单? 要创建指定金额的市价买单,首先需要检查交易所是否支持该功能(
exchange.has['createMarketBuyOrderWithCost']
)。如果支持,可以使用
createMarketBuyOrderWithCost
方法。示例:
order = await exchange.createMarketBuyOrderWithCost(symbol, cost)
createMarketBuyRequiresPrice
选项是什么意思? 许多交易所在下达现货市价买单时,要求金额以计价货币(而非基础货币)为单位。在这种情况下,交易所的
createMarketBuyRequiresPrice
选项会被设置为true。 示例:如果你想以市价买入BTC/USDT,你需要提供的金额是5 USDT,而非0.000X BTC。 我们添加了检查来防止错误,因为用户通常会提供基础货币的金额,而这些交易所明确要求价格参数。因此,默认情况下,如果你执行
create_order(symbol, 'market,' 'buy,' 10)
,而交易所开启了该选项,会抛出错误(
createOrder() requires the price argument for market buy orders to calculate the total cost to spend (amount * price), alternatively set the createMarketBuyOrderRequiresPrice option or param to false...
)。 如果交易所要求提供金额(cost),但用户提供了基础货币的数量,我们需要额外获取价格参数并相乘得到金额。如果你了解这种行为,可以直接禁用
createMarketBuyOrderRequiresPrice
,并在amount参数中传入金额,但禁用该选项并不意味着你可以用基础货币代替计价货币下单。 如果你执行
create_order(symbol, 'market', 'buy', 0.001, 20000)
,CCXT会使用提供的价格计算金额:0.01*20000,然后将该值发送给交易所。 如果你想直接在amount参数中传入金额,可以设置
exchange.options['createMarketBuyOrderRequiresPrice'] = False
(你需要确认amount参数代表的是市价买单的金额),然后执行
create_order(symbol, 'market', 'buy', 10)
。 这主要是为了避免用户出现以下错误:执行
create_order('SHIB/USDT', market, buy, 1000000)
,以为自己要买入100万SHIB,但实际上是买入价值100万USDT的SHIB。因此,默认情况下,CCXT的amount参数始终接受基础货币的数量。或者,如果交易所支持,你可以使用
createMarketBuyOrderWithCost
/
createMarketSellOrderWithCost
函数。更多信息请查看:市价买单
现货交易和永续合约交易有什么区别? 现货交易是指买入或卖出金融工具(如加密货币)并立即交割。它很直接,涉及资产的直接交换。而永续合约交易涉及衍生品合约,双方基于标的资产在未来约定日期交换金融工具或现金流。永续合约通常用于杠杆交易、投机或对冲,且合约到期前不一定涉及标的资产的交换。除此之外,进行合约交易时,你处理的是合约而非基础货币(如BTC)本身,因此如果你创建一个amount=1的订单,对应的BTC数量会根据合约大小(contractSize)而变化。你可以通过以下代码查看合约大小:
await exchange.loadMarkets()
symbol = 'XRP/USDT:USDT'
market = exchange.market(symbol)
print(market['contractSize'])
如何下达仅减仓(reduceOnly)订单? 仅减仓订单是一种只能减少头寸、不能增加头寸的订单类型。要下达仅减仓订单,通常需要在调用createOrder方法时将reduceOnly参数设置为true。这确保订单只有在能减少未平仓头寸时才会执行,如果执行会增加头寸,则部分成交或完全不成交。 JavaScript
javascript
const params = { 'reduceOnly': true, // 如果你想平仓则设为true,开仓则设为false }
const order = await exchange.createOrder (symbol, type, side, amount, price, params)
Python
python
params = { 'reduceOnly': True, # 如果你想平仓则设为True,开仓则设为False }
order = exchange.create_order (symbol, type, side, amount, price, params)
PHP
php
$params = { 'reduceOnly': true, // 如果你想平仓则设为true,开仓则设为false }
$order = $exchange->create_order ($symbol, $type, $side, $amount, $price, $params);
更多信息请查看:追踪订单
如何查看统一方法使用的端点? 要查看CCXT库中统一方法使用的端点,通常需要参考对应交易所实现的源代码。CCXT的统一方法抽象了底层的具体端点细节,因此这些信息不会通过库的API直接暴露。如需详细查看,可以在GitHub上的CCXT库源代码中查找特定交易所的方法实现。更多信息请查看:统一API
如何区分资金费率结构中的previousFundingRate、fundingRate和nextFundingRate? 资金费率结构包含三个不同的资金费率值:
  • previousFundingRate
    :最近已结算的资金费率。
  • fundingRate
    :即将到来的资金费率。该值会一直变化,直到资金结算时间过后,它会变成
    previousFundingRate
  • nextFundingRate
    :仅在部分交易所支持,是下一个即将到来的资金费率之后的预测费率。该值是当前之后的第二个资金费率。 举个例子,假设现在是12:30。
    previousFundingRate
    是12:00结算的费率,我们可以通过
    fundingRate
    查看即将到来的费率。在这个例子中,假设资金结算间隔为4小时,
    fundingRate
    对应的是4:00的费率,而
    nextFundingRate
    是8:00的预测费率。
python tutorials
模式2: 要创建指定金额的市价买单,首先需要检查交易所是否支持该功能(
exchange.has['createMarketBuyOrderWithCost']
)。如果支持,可以使用
createMarketBuyOrderWithCost
方法。示例:
exchange.has['createMarketBuyOrderWithCost']). If it does, then you can use the
模式3: 示例:如果你想以市价买入BTC/USDT,你需要提供的金额是5 USDT,而非0.000X BTC。我们添加了检查来防止错误,因为用户通常会提供基础货币的金额,而这些交易所明确要求价格参数。
create_order(symbol, 'market,' 'buy,' 10)
模式4: 如需查看所有交易所及其支持的方法的完整列表,请参考以下示例:https://github.com/ccxt/ccxt/blob/master/examples/js/exchange-capabilities.js
exchange.rateLimit
模式5: CCXT库在Python 3.5+中支持异步并发模式,使用async/await语法。异步Python版本基于纯asyncio和aiohttp实现。在异步模式下,所有属性和方法都保持不变,但大多数方法会被async关键字修饰。如果你想使用异步模式,需要链接到
ccxt.async_support
子包,示例如下:
ccxt.async_support

Reference Files

参考文件

This skill includes comprehensive documentation in
references/
:
  • cli.md - Cli documentation
  • exchanges.md - Exchanges documentation
  • faq.md - Faq documentation
  • getting_started.md - Getting Started documentation
  • manual.md - Manual documentation
  • other.md - Other documentation
  • pro.md - Pro documentation
  • specification.md - Specification documentation
Use
view
to read specific reference files when detailed information is needed.
本技能在
references/
目录下包含完整的文档:
  • cli.md - CLI文档
  • exchanges.md - 交易所文档
  • faq.md - 常见问题文档
  • getting_started.md - 入门文档
  • manual.md - 手册文档
  • other.md - 其他文档
  • pro.md - Pro版文档
  • specification.md - 规范文档
当需要详细信息时,使用
view
命令查看特定参考文件。

Working with This Skill

使用本技能的指南

For Beginners

初学者

Start with the getting_started or tutorials reference files for foundational concepts.
从getting_started或tutorials参考文件开始,学习基础概念。

For Specific Features

特定功能查询

Use the appropriate category reference file (api, guides, etc.) for detailed information.
使用对应分类的参考文件(如api、guides等)获取详细信息。

For Code Examples

代码示例

The quick reference section above contains common patterns extracted from the official docs.
上方的快速参考部分包含从官方文档中提取的常见使用模式。

Resources

资源

references/

references/

Organized documentation extracted from official sources. These files contain:
  • Detailed explanations
  • Code examples with language annotations
  • Links to original documentation
  • Table of contents for quick navigation
从官方来源提取的结构化文档。这些文件包含:
  • 详细说明
  • 带有语言标注的代码示例
  • 指向原始文档的链接
  • 用于快速导航的目录

scripts/

scripts/

Add helper scripts here for common automation tasks.
存放用于常见自动化任务的辅助脚本。

assets/

assets/

Add templates, boilerplate, or example projects here.
存放模板、样板代码或示例项目。

Notes

说明

  • This skill was automatically generated from official documentation
  • Reference files preserve the structure and examples from source docs
  • Code examples include language detection for better syntax highlighting
  • Quick reference patterns are extracted from common usage examples in the docs
  • 本技能由官方文档自动生成
  • 参考文件保留了源文档的结构和示例
  • 代码示例包含语言检测,以实现更好的语法高亮
  • 快速参考模式提取自文档中的常见使用示例

Updating

更新

To refresh this skill with updated documentation:
  1. Re-run the scraper with the same configuration
  2. The skill will be rebuilt with the latest information
如需用最新文档刷新本技能:
  1. 使用相同配置重新运行爬虫
  2. 技能将使用最新信息重建