jpskill.com
🛠️ 開発・MCP コミュニティ

ccxt

CCXTは、150以上の仮想通貨取引所のAPIにアクセスし、取引、市場データ取得、注文管理、自動売買などをJavaScript、Python、PHPで実現するSkill。

📜 元の英語説明(参考)

CCXT cryptocurrency trading library. Use for cryptocurrency exchange APIs, trading, market data, order management, and crypto trading automation across 150+ exchanges. Supports JavaScript/Python/PHP.

🇯🇵 日本人クリエイター向け解説

一言でいうと

CCXTは、150以上の仮想通貨取引所のAPIにアクセスし、取引、市場データ取得、注文管理、自動売買などをJavaScript、Python、PHPで実現するSkill。

※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o ccxt.zip https://jpskill.com/download/16675.zip && unzip -o ccxt.zip && rm ccxt.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/16675.zip -OutFile "$d\ccxt.zip"; Expand-Archive "$d\ccxt.zip" -DestinationPath $d -Force; ri "$d\ccxt.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して ccxt.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → ccxt フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-18
取得日時
2026-05-18
同梱ファイル
10

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

Ccxt Skill

公式ドキュメントから生成された、ccxt開発に関する包括的な支援。

このSkillを使うべき時

このSkillは、以下の場合にトリガーされるべきです。

  • ccxtを扱っている
  • ccxtの機能やAPIについて質問している
  • ccxtのソリューションを実装している
  • ccxtのコードをデバッグしている
  • ccxtのベストプラクティスを学んでいる

クイックリファレンス

一般的なパターン

パターン1: よくある質問

コードを実行しようとしていますが、うまくいきません。どうすれば修正できますか?

もしあなたの質問が上記のように短い形式で表現されている場合、私たちは助けません。私たちはプログラミングを教えません。もしあなたがマニュアルを読んで理解できない場合や、問題を報告する方法に関するCONTRIBUTINGドキュメントのガイドに正確に従えない場合も、私たちは助けません。問題を報告する方法に関するCONTRIBUTINGガイドを読み、マニュアルを読んでください。マニュアル全体を非常に注意深く読まずに、誰かのお金や時間を危険にさらすべきではありません。詳細な説明をたくさん読むことに慣れていない場合は、何も危険にさらすべきではありません。また、使用しているプログラミング言語に自信がない場合は、コーディングの基礎と練習にもっと適した場所があります。PythonのチュートリアルやJSの動画を探したり、例を試したりしてください。これが他の人が学習曲線を登る方法です。何かを学びたいなら、近道はありません。

助けを得るために何が必要ですか?

質問をする際は:

  1. まず、検索ボタンで重複がないか確認してください!
  2. リクエストとレスポンスを詳細モードで投稿してください!
  3. 問題が発生している行の直前に exchange.verbose = true を追加し、画面に表示されるものをコピー&ペーストしてください。これは、トラブルシューティングセクション、README、および以前の問題やプルリクエストに対する同様の質問への多くの回答で、どこにでも書かれており、言及されています。言い訳はできません。詳細な出力には、取引所からのリクエストとレスポンスの両方が含まれている必要があります。
  4. 完全なエラーコールスタックを含めてください!
  5. プログラミング言語と言語のバージョン番号を記述してください
  6. CCXT / CCXT Proライブラリのバージョン番号を記述してください
  7. どの取引所であるかを記述してください
  8. どのメソッドを呼び出そうとしているかを記述してください
  9. 問題を再現するためのコードを投稿してください。完全な短い実行可能なプログラムにし、行を省略せずに、取引所のインスタンス化コードを含め、できるだけコンパクト(5〜10行のコード)にしてください。問題の再現に必要なコードの本質だけを残して、無関係な部分をすべて削除してください。

コードやエラーのスクリーンショットを投稿しないでください。プレーンテキストで出力とコードを投稿してください!コードと出力をトリプルバッククォートで囲んでください:GOOD。バッククォート記号()を引用符記号(')と混同しないでください:'''BAD'''。シングルバッククォートをトリプルバッククォートと混同しないでください:BAD`

apiKeyとsecretを投稿しないでください!安全に保管してください(投稿する前に削除してください)!

メソッドを呼び出していますが、エラーが発生します。何が間違っていますか?

問題を適切に報告していません)コミュニティがあなたを助けるのを手伝ってください)これを読んで、手順に従ってください:https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-submit-an-issue。繰り返しますが、問題を再現するためのコードと、詳細なリクエストとレスポンスが必要です。エラーのトレースバック、レスポンス、リクエスト、コードだけでは不十分です

メソッド呼び出しから誤った結果が得られました。助けてもらえますか?

基本的には前の質問と同じ答えです。以下を読んで正確に従ってください: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はいつ追加されますか?推定時間は?いつ頃期待できますか?

オープンソースの作業について約束や見積もりはしません。これの背後にある理由は、前の段落で説明されています。

Issueでリクエストされた取引所のサポートはいつ追加されますか?

繰り返しますが、上記の理由により、これまたはあの取引所を追加する日付を約束することはできません。答えは常に同じままです:できるだけ早く。

機能が追加されるまでどれくらい待つ必要がありますか?自分で実装するか、CCXT Dev Teamが実装するのを待つか決める必要があります。

自分で実装してください。私たちを待たないでください。できるだけ早く追加します。また、あなたの貢献を大歓迎します:https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code

以前にリクエストされた機能fooの追加の進捗状況はどうですか?取引所barの実装はどのように行っていますか?

このタイプの質問は通常、時間の無駄です。なぜなら、それに答えるには通常、コンテキストの切り替えに時間がかかりすぎ、多くの場合、この質問に答えるよりも、新しい機能または新しい取引所のコードでリクエストを満たす方が時間がかかります。このオープンソースプロジェクトの進捗状況も公開されているため、状況がどうなっているのか疑問に思ったら、コミット履歴をご覧ください。

このPRのステータスはどうですか?何か更新はありますか?もしそれがn

(原文がここで切り詰められています)

📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

Ccxt Skill

Comprehensive assistance with ccxt development, generated from official documentation.

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

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:BADDO 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.0120000 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

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.

Working with This Skill

For Beginners

Start with the getting_started or tutorials reference files for foundational concepts.

For Specific Features

Use the appropriate category reference file (api, guides, etc.) for detailed information.

For Code Examples

The quick reference section above contains common patterns extracted from the official docs.

Resources

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/

Add helper scripts here for common automation tasks.

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

同梱ファイル

※ ZIPに含まれるファイル一覧。`SKILL.md` 本体に加え、参考資料・サンプル・スクリプトが入っている場合があります。