class Core\Apis \ Rate


Get the latest rates for the given currency pair across all tracked exchanges.

Parameters:
currency1 - first currency, e.g. 'nzd'
currency2 - second currency, e.g. 'btc'

Method Summary

Name Description
getEndpoint()
getHash($arguments) Return a 32-character hash from the given argmuents so that it can be cached.
getJSON($arguments) Compile the JSON with the given arguments, as parsed from the #getEndpoint() string.

Inherited Method Summary

Name Description
render($arguments) Try and get the JSON result for this API, and return either {success: true: result: $json} or {success: false, error: $message} if an exception occured. (from CachedApi)
getAge() How long are API calls cached? (from CachedApi)
getCached($arguments) (from CachedApi)
renderJSON($arguments) (from CachedApi)

public function getEndpoint()

Overrides:
getEndpoint()
Returns:
e.g. "/api/v1/currency/:currency"

public function getHash($arguments)

Return a 32-character hash from the given argmuents so that it can be cached. (from getHash)

Overrides:
getHash($arguments)

public function getJSON($arguments)

Compile the JSON with the given arguments, as parsed from the #getEndpoint() string. (from getJSON)

Overrides:
getJSON($arguments)