Skip to content

Commit

Permalink
1.10.637
Browse files Browse the repository at this point in the history
[ci skip]
  • Loading branch information
Travis CI committed Jan 11, 2018
1 parent c53af2e commit b171179
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 10 deletions.
4 changes: 2 additions & 2 deletions build/ccxt.browser.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion ccxt.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const errors = require ('./js/base/errors')
//-----------------------------------------------------------------------------
// this is updated by vss.js when building

const version = '1.10.636'
const version = '1.10.637'

Exchange.ccxtVersion = version

Expand Down
11 changes: 10 additions & 1 deletion doc/manual.rst
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,16 @@ Because the set of methods differs from exchange to exchange, the ccxt library i

The endpoint URLs are predefined in the ``api`` property for each exchange. You don't have to override it, unless you are implementing a new exchange API (at least you should know what you're doing).

The endpoint definition is a list of all API URLs exposed by an exchange. This list gets converted to callable methods upon exchange instantiation. Each URL in the API endpoint list gets a corresponding callable method. For example, if an exchange offers an HTTP GET URL for querying prices like ``https://example.com/public/quotes``, it is converted to a method named ``example.publicGetQuotes () / $example->publicGetQuotes ()``. This is done automatically for all exchanges, therefore the ccxt library supports all possible URLs offered by crypto exchanges.
Implicit API Methods
--------------------

In the code for each exchange, you'll notice that functions that make API requests aren't explicitly defined. This is because the ``api`` definition in the exchange description JSON is used to create *magic functions* (aka *partial functions* or *closures*) inside the exchange subclass. That implicit injection is done by the ``defineRestApi/define_rest_api`` base exchange method.

Each partial function takes a dictionary of ``params`` and returns the API response. For example, if an exchange offers a HTTP GET URL for querying prices like ``https://example.com/public/quotes``, it is converted to a method named ``example.publicGetQuotes (params = {}) / $example->publicGetQuotes ($params = array ())``.

Upon instantiation the base exchange class takes each URL from its list of endpoints, splits it into words, and then makes up a callable function name from those words by using a partial construct.

The endpoint definition is a **full list of ALL API URLs** exposed by an exchange. This list gets converted to callable methods upon exchange instantiation. Each URL in the API endpoint list gets a corresponding callable method. This is done automatically for all exchanges, therefore the ccxt library supports **all possible URLs** offered by crypto exchanges.

Public/Private API
------------------
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ccxt",
"version": "1.10.636",
"version": "1.10.637",
"description": "A JavaScript / Python / PHP cryptocurrency trading library with support for 90+ exchanges",
"main": "./ccxt.js",
"unpkg": "build/ccxt.browser.js",
Expand Down
2 changes: 1 addition & 1 deletion php/Exchange.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

namespace ccxt;

$version = '1.10.636';
$version = '1.10.637';

abstract class Exchange {

Expand Down
2 changes: 1 addition & 1 deletion python/ccxt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

# ----------------------------------------------------------------------------

__version__ = '1.10.636'
__version__ = '1.10.637'

# ----------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion python/ccxt/async/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# -----------------------------------------------------------------------------

__version__ = '1.10.636'
__version__ = '1.10.637'

# -----------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion python/ccxt/async/base/exchange.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# -----------------------------------------------------------------------------

__version__ = '1.10.636'
__version__ = '1.10.637'

# -----------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion python/ccxt/base/exchange.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# -----------------------------------------------------------------------------

__version__ = '1.10.636'
__version__ = '1.10.637'

# -----------------------------------------------------------------------------

Expand Down

0 comments on commit b171179

Please sign in to comment.