-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:ccxt/ccxt
- Loading branch information
Showing
88 changed files
with
2,610 additions
and
268 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -225,13 +225,13 @@ console.log (ccxt.exchanges) // print all available exchanges | |
|
||
All-in-one browser bundle (dependencies included), served from a CDN of your choice: | ||
|
||
* jsDelivr: https://cdn.jsdelivr.net/npm/[email protected].46/dist/ccxt.browser.js | ||
* unpkg: https://unpkg.com/[email protected].46/dist/ccxt.browser.js | ||
* jsDelivr: https://cdn.jsdelivr.net/npm/[email protected].63/dist/ccxt.browser.js | ||
* unpkg: https://unpkg.com/[email protected].63/dist/ccxt.browser.js | ||
|
||
CDNs are not updated in real-time and may have delays. Defaulting to the most recent version without specifying the version number is not recommended. Please, keep in mind that we are not responsible for the correct operation of those CDN servers. | ||
|
||
```HTML | ||
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected].46/dist/ccxt.browser.js"></script> | ||
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected].63/dist/ccxt.browser.js"></script> | ||
``` | ||
|
||
Creates a global `ccxt` object: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1999,14 +1999,14 @@ JavaScript (for use with the ``<script>`` tag): | |
All-in-one browser bundle (dependencies included), served from a CDN of your choice: | ||
|
||
|
||
* jsDelivr: https://cdn.jsdelivr.net/npm/[email protected].46/dist/ccxt.browser.js | ||
* unpkg: https://unpkg.com/[email protected].46/dist/ccxt.browser.js | ||
* jsDelivr: https://cdn.jsdelivr.net/npm/[email protected].63/dist/ccxt.browser.js | ||
* unpkg: https://unpkg.com/[email protected].63/dist/ccxt.browser.js | ||
|
||
CDNs are not updated in real-time and may have delays. Defaulting to the most recent version without specifying the version number is not recommended. Please, keep in mind that we are not responsible for the correct operation of those CDN servers. | ||
|
||
.. code-block:: HTML | ||
|
||
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected].46/dist/ccxt.browser.js"></script> | ||
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected].63/dist/ccxt.browser.js"></script> | ||
|
||
Creates a global ``ccxt`` object: | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
import os | ||
import sys | ||
|
||
root = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) | ||
sys.path.append(root + '/python') | ||
|
||
import ccxt # noqa: E402 | ||
|
||
exchange = ccxt.phemex({ | ||
'apiKey': 'YOUR_API_KEY', | ||
'secret': 'YOUR_SECRET', | ||
'enableRateLimit': True, | ||
}) | ||
|
||
# exchange.set_sandbox_mode(True) | ||
|
||
# Example 1: Creating stop-market order | ||
symbol = 'LTC/USDT' | ||
type = 'market' | ||
side = 'buy' | ||
amount = 0.5 | ||
|
||
params = { | ||
'stopPrice': 50, | ||
} | ||
|
||
stop_market = exchange.create_order(symbol, type, side, amount, None, params) | ||
print(stop_market) | ||
|
||
# Example 2: Create stop-limit order | ||
symbol = 'LTC/USDT' | ||
type = 'limit' | ||
side = 'buy' | ||
amount = 0.5 | ||
price = 70 | ||
|
||
params = { | ||
'stopPrice': 50, | ||
} | ||
|
||
stop_limit = exchange.create_order(symbol, type, side, amount, price, params) | ||
print(stop_limit) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.