追踪订单
通过订单 ID 查询一个或多个 Fast Charge 订单的撮合状态。
端点
请求头
名称
类型
描述
请求体
名称
类型
描述
请求体示例
{
"order_ids": [
"673c17a3129f1881382e98e2",
"673c17a3129f1881382e98e3"
]
}响应
成功
错误
请求示例
后续步骤
Last updated
{
"results": [
{
"order_id": "673c17a3129f1881382e98e2",
"status": "Completed"
},
{
"order_id": "673c17a3129f1881382e98e3",
"status": "Pending"
}
]
}{
"error": true,
"message": "TSAS:106 API_KEY_REQUIRED"
}{
"error": true,
"message": "TSAS:107 INVALID_API_KEY"
}{
"statusCode": 400,
"code": "FST_ERR_VALIDATION",
"error": "Bad Request",
"message": "body must have required property 'order_ids'"
}curl -X POST "https://api.tronsave.io/v0/fast-charge-order-tracking" \
-H "Content-Type: application/json" \
-H "apikey: YOUR_API_KEY" \
-d '{
"order_ids": [
"673c17a3129f1881382e98e2",
"673c17a3129f1881382e98e3"
]
}'const res = await fetch("https://api.tronsave.io/v0/fast-charge-order-tracking", {
method: "POST",
headers: {
"Content-Type": "application/json",
apikey: "YOUR_API_KEY",
},
body: JSON.stringify({
order_ids: [
"673c17a3129f1881382e98e2",
"673c17a3129f1881382e98e3",
],
}),
});
const data = await res.json();
console.log(data);import requests
url = "https://api.tronsave.io/v0/fast-charge-order-tracking"
headers = {
"Content-Type": "application/json",
"apikey": "YOUR_API_KEY",
}
body = {
"order_ids": [
"673c17a3129f1881382e98e2",
"673c17a3129f1881382e98e3",
],
}
res = requests.post(url, json=body, headers=headers)
print(res.json())import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class TrackOrder {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
String body = """
{
"order_ids": [
"673c17a3129f1881382e98e2",
"673c17a3129f1881382e98e3"
]
}
""";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.tronsave.io/v0/fast-charge-order-tracking"))
.header("Content-Type", "application/json")
.header("apikey", "YOUR_API_KEY")
.POST(HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> response =
client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}package main
import (
"bytes"
"fmt"
"io"
"net/http"
)
func main() {
body := []byte(`{
"order_ids": [
"673c17a3129f1881382e98e2",
"673c17a3129f1881382e98e3"
]
}`)
req, _ := http.NewRequest(
"POST",
"https://api.tronsave.io/v0/fast-charge-order-tracking",
bytes.NewBuffer(body),
)
req.Header.Set("Content-Type", "application/json")
req.Header.Set("apikey", "YOUR_API_KEY")
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
data, _ := io.ReadAll(resp.Body)
fmt.Println(string(data))
}use reqwest::blocking::Client;
use serde_json::json;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = Client::new();
let body = json!({
"order_ids": [
"673c17a3129f1881382e98e2",
"673c17a3129f1881382e98e3"
]
});
let res = client
.post("https://api.tronsave.io/v0/fast-charge-order-tracking")
.header("Content-Type", "application/json")
.header("apikey", "YOUR_API_KEY")
.json(&body)
.send()?;
println!("{}", res.text()?);
Ok(())
}