Check order status

1. Port Change

For detailed parameters reference API port documents, check order status port here api/v2/queryOrderState,
reference method POST application/json

2. Request Parameter Precautions

Parameter
Explanation
equipmentNo
Environment number, this can be used to check numbers associted with all of the order's information, please do not disclose

3.Code Example

java code example

1
OkHttpClient client = new OkHttpClient();
2
3
MediaType mediaType = MediaType.parse("application/json");
4
RequestBody body = RequestBody.create(mediaType, "{\n \"equipmentNo\": \"Zasdf352943090468518\",\n \n \"sourceType\": \"ANDROID\",\n\n \"orderId\": \"de752da3-0ff7-4682-8038-d8e1f20cad95\"\n}");
5
Request request = new Request.Builder()
6
.url("https://{host}/api/v2/queryOrderState")
7
.post(body)
8
.addHeader("Content-Type", "application/json")
9
.addHeader("cache-control", "no-cache")
10
.build();
11
12
Response response = client.newCall(request).execute();
Copied!

C# code example

1
var client = new RestClient("https://{host}/api/v2/queryOrderState");
2
var request = new RestRequest(Method.POST);
3
request.AddHeader("cache-control", "no-cache");
4
request.AddHeader("Content-Type", "application/json");
5
request.AddParameter("undefined", "{\n \"equipmentNo\": \"Zasdf352943090468518\",\n \n \"sourceType\": \"ANDROID\",\n\n \"orderId\": \"de752da3-0ff7-4682-8038-d8e1f20cad95\"\n}", ParameterType.RequestBody);
6
IRestResponse response = client.Execute(request);
Copied!

Objective-C code example

1
#import <Foundation/Foundation.h>
2
3
NSDictionary *headers = @{ @"Content-Type": @"application/json",
4
@"cache-control": @"no-cache" };
5
NSDictionary *parameters = @{ @"equipmentNo": @"Zasdf352943090468518",
6
@"sourceType": @"ANDROID",
7
@"orderId": @"de752da3-0ff7-4682-8038-d8e1f20cad95" };
8
9
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
10
11
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://{host}/api/v2/queryOrderState"]
12
cachePolicy:NSURLRequestUseProtocolCachePolicy
13
timeoutInterval:10.0];
14
[request setHTTPMethod:@"POST"];
15
[request setAllHTTPHeaderFields:headers];
16
[request setHTTPBody:postData];
17
18
NSURLSession *session = [NSURLSession sharedSession];
19
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
20
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
21
if (error) {
22
NSLog(@"%@", error);
23
} else {
24
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
25
NSLog(@"%@", httpResponse);
26
}
27
}];
28
[dataTask resume];
Copied!

Nodejs code example

1
var http = require("https");
2
3
var options = {
4
"method": "POST",
5
"hostname": [
6
"transfer",
7
"swft",
8
"pro"
9
],
10
"path": [
11
"api",
12
"v2",
13
"queryOrderState"
14
],
15
"headers": {
16
"Content-Type": "application/json",
17
"cache-control": "no-cache"
18
}
19
};
20
21
var req = http.request(options, function (res) {
22
var chunks = [];
23
24
res.on("data", function (chunk) {
25
chunks.push(chunk);
26
});
27
28
res.on("end", function () {
29
var body = Buffer.concat(chunks);
30
console.log(body.toString());
31
});
32
});
33
34
req.write(JSON.stringify({ equipmentNo: 'Zasdf352943090468518',
35
sourceType: 'ANDROID',
36
orderId: 'de752da3-0ff7-4682-8038-d8e1f20cad95' }));
37
req.end();
Copied!

4.Response result example

1
{
2
"data": {
3
"changeType": "advanced",
4
"choiseFeeType": "3",
5
"dealReceiveCoinAmt": "10.513615",
6
"depositCoinAmt": "0.276",
7
"depositCoinCode": "ETH",
8
"depositCoinFeeAmt": "0.000276",
9
"depositCoinFeeRate": "0.001",
10
"depositCoinState": "already_confirm",
11
"destinationAddr": "loveqyw12345",
12
"detailState": "receive_complete",
13
"orderId": "de752da3-0ff7-4682-8038-d8e1f20cad95",
14
"orderState": "wait_send",
15
"platformAddr": "0x6e76d9e78b6f4878fbe83e6985185173373f0b7e",
16
"receiveCoinAmt": "10.403011",
17
"receiveCoinCode": "EOS",
18
"receiveSwftAmt": "14.06",
19
"refundAddr": "0x189547cb7984711c2ab25b1543a784e65628a8f6",
20
"refundCoinAmt": "",
21
"refundCoinMinerFee": "",
22
"refundDepositTxid": "",
23
"refundSwftAmt": "",
24
"swftCoinFeeRate": "0.0005",
25
"swftCoinState": "",
26
"swftReceiveAddr": "",
27
"swftRefundAddr": "",
28
"tradeState": "",
29
"transactionId": "072a7915ac9de0e64d5131afde8f61e1cdf0cf517ffa3f8db2f2d26bf208b658"
30
},
31
"resCode": "800",
32
"resMsg": "成功"
33
}
Copied!
For a detailed explanation of returned values, please see the Google document
Business Reference Graph
Last modified 1yr ago