Home Notices Documents Classes Download Others Rice
Classes  >  zaifapi  >  Ticker(string)
zaifapi class : Ticker(string) method

Description

Gets the ticker.

Syntax

zaifapiInstance.Ticker(string currencyPair)

Arguments

ClassNameDescription
stringcurrencyPairA currency pair.

Return value

ClassDescription
stringA JSON-text.

Sample code

1:

zaifapi zaifapiIns = new zaifapi();

2:

string jsonStr = zaifapiIns.Ticker("btc_jpy");

Example for JSON-text

{"last": 872425.0, "high": 893000.0, "low": 835950.0, "vwap": 870818.964, "volume": 2529.129, "bid": 872430.0, "ask": 872845.0}

Notes

It is a public API for the spot transaction. You can get the information without setting the API key and the secret key.

If a valid currency pair is specified as an argument, the ticker on that currency pair is returned.

If an API error occurs, the following JSON-text will be returned.

{"error": "..."}

"error" is different for each API error.

If an HTTP error occurs, the following JSON-text will be returned.

{"success": -1000,"error": { "statuscode" : 404, "message": "Not Found"}}

"statuscode" and "message" are different for each HTTP error.

If the request times out, the following JSON-text will be returned.

{"success": -1001,"error": { "typename" : "TaskCanceledException", "message": "A task was canceled."}}

If the request fails due to other exceptions, the following JSON-text will be returned.

{"success": -1002,"error": { "typename" : "...", "message": "..."}}

"typename" and "message" are different for each exception.

Links for reference

Copyright © Rice All rights reserved.