Cancel Order

TIP

This method only supports canceling orders that have not been completed after 5 minutes of creation.

API Method

POST /v2/order/cancel

Request params

FieldPositionTypeRequiredDescription
order_nobodystringtrueOrder No

Request params example

{
    "order_no": "2304170329503866885309"
}

Responses

FieldTypeRequiredDescription
codeintegertrue
msgstringtrue
request_idstringtrue
dataBuyOrderDetailfalse

Response example

{
    "code": 0,
    "msg": "ok",
    "request_id": "a16a9bf9-34e8-4e23-8432-46861e46c66b",
    "data": {
        "order_no": "2408228772142551040100",
        "order_type": 0,
        "resource_type": 1,
        "receive_address": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
        "price_in_sun": 105,
        "freeze_time": 0,
        "create_time": 1724318708,
        "resource_value": 32000,
        "frozen_resource_value": 0,
        "rent_duration": 10,
        "rent_time_unit": "m",
        "rent_time_second": 600,
        "rent_expire_time": 0,
        "frozen_tx_id": "",
        "pay_time": 1724318708,
        "pay_amount": 3.92,
        "refund_amount": 3.92,
        "refund_time": 1724319451,
        "is_split": 0,
        "is_lock": 1,
        "lock_period": 200,
        "status": 12,
        "business_status": 4
    },
    "pagination": null
}

Code demo

curl --location --request POST 'https://feee.io/open/v2/order/cancel' \
--header 'key: <key>' \
--header 'User-Agent: Feee.io Client/1.0.0 (https://feee.io)' \
--header 'Content-Type: application/json' \
--data-raw '<body data here>'
package main

import (
   "fmt"
   "strings"
   "net/http"
   "io/ioutil"
)

func main() {

   url := "https://feee.io/open/v2/order/cancel"
   method := "POST"

   payload := strings.NewReader(`<body data here>`)

   client := &http.Client {
   }
   req, err := http.NewRequest(method, url, payload)

   if err != nil {
      fmt.Println(err)
      return
   }
   req.Header.Add("key", "<key>")
   req.Header.Add("User-Agent", "Feee.io Client/1.0.0 (https://feee.io)")
   req.Header.Add("Content-Type", "application/json")

   res, err := client.Do(req)
   if err != nil {
      fmt.Println(err)
      return
   }
   defer res.Body.Close()

   body, err := ioutil.ReadAll(res.Body)
   if err != nil {
      fmt.Println(err)
      return
   }
   fmt.Println(string(body))
}
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
   CURLOPT_URL => 'https://feee.io/open/v2/order/cancel',
   CURLOPT_RETURNTRANSFER => true,
   CURLOPT_ENCODING => '',
   CURLOPT_MAXREDIRS => 10,
   CURLOPT_TIMEOUT => 0,
   CURLOPT_FOLLOWLOCATION => true,
   CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
   CURLOPT_CUSTOMREQUEST => 'POST',
   CURLOPT_POSTFIELDS =>'<body data here>',
   CURLOPT_HTTPHEADER => array(
      'key: <key>',
      'User-Agent: Feee.io Client/1.0.0 (https://feee.io)',
      'Content-Type: application/json'
   ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

import http.client
import json

conn = http.client.HTTPSConnection("feee.io")
payload = "<body data here>"
headers = {
   'key': '<key>',
   'User-Agent': 'Feee.io Client/1.0.0 (https://feee.io)',
   'Content-Type': 'application/json'
}
conn.request("POST", "/open/v2/order/cancel", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
OkHttpClient client = new OkHttpClient().newBuilder()
   .build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "<body data here>");
Request request = new Request.Builder()
   .url("https://feee.io/open/v2/order/cancel")
   .method("POST", body)
   .addHeader("key", "<key>")
   .addHeader("User-Agent", "Feee.io Client/1.0.0 (https://feee.io)")
   .addHeader("Content-Type", "application/json")
   .build();
Response response = client.newCall(request).execute();
Last Updated: