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

OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"equipmentNo\": \"Zasdf352943090468518\",\n \n \"sourceType\": \"ANDROID\",\n\n \"orderId\": \"de752da3-0ff7-4682-8038-d8e1f20cad95\"\n}");
Request request = new Request.Builder()
.url("https://transfer.swft.pro/api/v2/queryOrderState")
.post(body)
.addHeader("Content-Type", "application/json")
.addHeader("cache-control", "no-cache")
.build();
Response response = client.newCall(request).execute();

C# code example

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

Objective-C code example

#import <Foundation/Foundation.h>
NSDictionary *headers = @{ @"Content-Type": @"application/json",
@"cache-control": @"no-cache" };
NSDictionary *parameters = @{ @"equipmentNo": @"Zasdf352943090468518",
@"sourceType": @"ANDROID",
@"orderId": @"de752da3-0ff7-4682-8038-d8e1f20cad95" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://transfer.swft.pro/api/v2/queryOrderState"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];

Nodejs code example

var http = require("https");
var options = {
"method": "POST",
"hostname": [
"transfer",
"swft",
"pro"
],
"path": [
"api",
"v2",
"queryOrderState"
],
"headers": {
"Content-Type": "application/json",
"cache-control": "no-cache"
}
};
var req = http.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({ equipmentNo: 'Zasdf352943090468518',
sourceType: 'ANDROID',
orderId: 'de752da3-0ff7-4682-8038-d8e1f20cad95' }));
req.end();

4.Response result example

{
"data": {
"changeType": "advanced",
"choiseFeeType": "3",
"dealReceiveCoinAmt": "10.513615",
"depositCoinAmt": "0.276",
"depositCoinCode": "ETH",
"depositCoinFeeAmt": "0.000276",
"depositCoinFeeRate": "0.001",
"depositCoinState": "already_confirm",
"destinationAddr": "loveqyw12345",
"detailState": "receive_complete",
"orderId": "de752da3-0ff7-4682-8038-d8e1f20cad95",
"orderState": "wait_send",
"platformAddr": "0x6e76d9e78b6f4878fbe83e6985185173373f0b7e",
"receiveCoinAmt": "10.403011",
"receiveCoinCode": "EOS",
"receiveSwftAmt": "14.06",
"refundAddr": "0x189547cb7984711c2ab25b1543a784e65628a8f6",
"refundCoinAmt": "",
"refundCoinMinerFee": "",
"refundDepositTxid": "",
"refundSwftAmt": "",
"swftCoinFeeRate": "0.0005",
"swftCoinState": "",
"swftReceiveAddr": "",
"swftRefundAddr": "",
"tradeState": "",
"transactionId": "072a7915ac9de0e64d5131afde8f61e1cdf0cf517ffa3f8db2f2d26bf208b658"
},
"resCode": "800",
"resMsg": "成功"
}

For a detailed explanation of returned values, please see the Google document

Business Reference Graph