Home Notices Documents Classes Download Others Rice
Classes  >  zaifapi  >  CancelOrder(dictionary{string})
zaifapi class : CancelOrder(dictionary{string}) method

Description

Cancels an order.

Syntax

zaifapiInstance.CancelOrder(dictionary{string} parameters)

Arguments

ClassNameDescription
dictionary{string}parametersParameters needed for the request.

Return value

ClassDescription
stringA JSON-text.

Sample code

1:

string apiKey = "3622c294-zs5m-587w-vv7j-sdf454h1sdbl";

2:

string secretKey = "4be789k3-dd7r-9d23-jy45-qng4c83hjk1g";

3:

zaifapi zaifapiIns = new zaifapi(apiKey, secretKey);

4:

dictionary{string} parameters = new dictionary{string}();

5:

parameters.Add("order_id", "39917305");

6:

parameters.Add("currency_pair", "eth_jpy");

7:

string jsonStr = zaifapiIns.CancelOrder(parameters);

Example for JSON-text

{"success": 1, "return": {"order_id": 39917305, "funds": {"jpy": 100000000.0, "btc": 7.66e-06, "xem": 0.0, "mona": 0.0, "BCH": 9.91e-05, "ETH": 3.89e-05, "ZAIF": 0.0}}}

Notes

It is a trade API for the spot transaction. You can not get the information if do not set the API key and the secret key.

This method is a low level interface to the API. You can fully control the request by writing parameters directly.

Please refer to "ZaifAPI Documents" below for details of parameters.

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

{"success": 0, "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.