zaifapi class : Groups(string) method
Description
Gets information of futures trading.
Syntax
zaifapiInstance.Groups(string groupId)
Arguments
Class | Name | Description |
string | groupId | A group identifier. |
Return value
Class | Description |
zaifres | A response to the request which have a JSON-text. |
Sample code
1: | zaifapi zaifapiIns = new zaifapi(); |
2: | zaifres zaifresIns = zaifapiIns.Groups("all"); |
3: | string jsonStr = zaifresIns.Result; |
Example for JSON-text
groupId : "all" |
[{"id": 1, "currency_pair": "btc_jpy", "start_timestamp": 1490972400, "end_timestamp": 4102412399, "use_swap": true}, {"id": 2, "currency_pair": "btc_jpy", "start_timestamp": 1490972400, "end_timestamp": 1498834800, "use_swap": false}, {"id": 3, "currency_pair": "btc_jpy", "start_timestamp": 1496242800, "end_timestamp": 1506783600, "use_swap": false}, {"id": 4, "currency_pair": "btc_jpy", "start_timestamp": 1504191600, "end_timestamp": 1514732400, "use_swap": false}, {"id": 5, "currency_pair": "btc_jpy", "start_timestamp": 1512054000, "end_timestamp": 1522508400, "use_swap": false}] |
groupId : "active" |
[{"id": 1, "currency_pair": "btc_jpy", "start_timestamp": 1490972400, "end_timestamp": 4102412399, "use_swap": true}] |
groupId : "1" |
[{"id": 1, "currency_pair": "btc_jpy", "start_timestamp": 1490972400, "end_timestamp": 4102412399, "use_swap": true}] |
Notes
It is a public API for the futures transaction. You can get the information without setting the API key and the secret key.
The groupId argument must be specified "all", "active", or "1" or more.
If you specify "all" for the groupId argument, the information of all futures trading will be returned. Please note that it also includes futures trading already closed.
If you specify "active" for the groupId argument, the information for active futures trading will be returned. The active futures trading is only AirFX, so information of the AirFX will be returned.
If you specify "1" for the groupId argument, the information for the AirFX will be returned .
If you specify "2" or more for the groupId argument, the information will be returned if there is an applicable futures transaction.
An instance of the zaifres class is returned as the response to the request. This instance holds the JSON-text of the result of the response.
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.