Loading...
Loading...
Compare original and translation side by side
GOOD) with the quote symbol ('): '''BAD''' Don't confuse a single backtick with triple backticks: 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 createMarketBuyOrderWithCostpython tutorialsexchange.has['createMarketBuyOrderWithCost']). If it does, then you can use thecreate_order(symbol, 'market,' 'buy,' 10)exchange.rateLimitccxt.async_supportexchange.verbose = trueGOOD)和单引号(')混淆:'''BAD''',也不要用单个反引号代替三个反引号:exchange.has['createOrderWithTakeProfitAndStopLoss']exchange.has['createStopLossOrder']exchange.has['createTakeProfitOrder'].featuresexchange.has['createMarketBuyOrderWithCost']createMarketBuyOrderWithCostorder = await exchange.createMarketBuyOrderWithCost(symbol, cost)createMarketBuyRequiresPricecreateMarketBuyRequiresPricecreate_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...createMarketBuyOrderRequiresPricecreate_order(symbol, 'market', 'buy', 0.001, 20000)exchange.options['createMarketBuyOrderRequiresPrice'] = Falsecreate_order(symbol, 'market', 'buy', 10)create_order('SHIB/USDT', market, buy, 1000000)createMarketBuyOrderWithCostcreateMarketSellOrderWithCostawait exchange.loadMarkets()
symbol = 'XRP/USDT:USDT'
market = exchange.market(symbol)
print(market['contractSize'])const params = { 'reduceOnly': true, // 如果你想平仓则设为true,开仓则设为false }
const order = await exchange.createOrder (symbol, type, side, amount, price, params)params = { 'reduceOnly': True, # 如果你想平仓则设为True,开仓则设为False }
order = exchange.create_order (symbol, type, side, amount, price, params)$params = { 'reduceOnly': true, // 如果你想平仓则设为true,开仓则设为false }
$order = $exchange->create_order ($symbol, $type, $side, $amount, $price, $params);previousFundingRatefundingRatepreviousFundingRatenextFundingRatepreviousFundingRatefundingRatefundingRatenextFundingRatepython tutorialsexchange.has['createMarketBuyOrderWithCost']createMarketBuyOrderWithCostexchange.has['createMarketBuyOrderWithCost']). If it does, then you can use thecreate_order(symbol, 'market,' 'buy,' 10)exchange.rateLimitccxt.async_supportccxt.async_supportreferences/viewreferences/view