Get a trade's status
curl --request GET \
--url https://external-rfq-partner.polymarket.com/v1/rfq-trades/{tradeId} \
--header 'RFQ-Key-Id: <api-key>' \
--header 'RFQ-Signature: <api-key>' \
--header 'RFQ-Timestamp: <api-key>'import requests
url = "https://external-rfq-partner.polymarket.com/v1/rfq-trades/{tradeId}"
headers = {
"RFQ-Key-Id": "<api-key>",
"RFQ-Timestamp": "<api-key>",
"RFQ-Signature": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'RFQ-Key-Id': '<api-key>',
'RFQ-Timestamp': '<api-key>',
'RFQ-Signature': '<api-key>'
}
};
fetch('https://external-rfq-partner.polymarket.com/v1/rfq-trades/{tradeId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://external-rfq-partner.polymarket.com/v1/rfq-trades/{tradeId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"RFQ-Key-Id: <api-key>",
"RFQ-Signature: <api-key>",
"RFQ-Timestamp: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://external-rfq-partner.polymarket.com/v1/rfq-trades/{tradeId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("RFQ-Key-Id", "<api-key>")
req.Header.Add("RFQ-Timestamp", "<api-key>")
req.Header.Add("RFQ-Signature", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://external-rfq-partner.polymarket.com/v1/rfq-trades/{tradeId}")
.header("RFQ-Key-Id", "<api-key>")
.header("RFQ-Timestamp", "<api-key>")
.header("RFQ-Signature", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://external-rfq-partner.polymarket.com/v1/rfq-trades/{tradeId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["RFQ-Key-Id"] = '<api-key>'
request["RFQ-Timestamp"] = '<api-key>'
request["RFQ-Signature"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"tradeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"idempotencyKey": "<string>",
"status": "PENDING",
"createdAt": "2023-11-07T05:31:56Z",
"combo": {
"conditionId": "<string>",
"tokenIdYes": "<string>",
"tokenIdNo": "<string>",
"legs": [
{
"marketId": "<string>",
"outcome": "yes"
}
]
},
"transactionHash": "<string>",
"failureReason": "unknown_account",
"filledAt": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "validation_failed",
"message": "stale_order (taker): order timestamp is 12m0s old (max 10m0s)",
"retryable": false,
"details": {
"reason": "stale_order",
"party": "taker"
}
}
}{
"error": {
"code": "validation_failed",
"message": "stale_order (taker): order timestamp is 12m0s old (max 10m0s)",
"retryable": false,
"details": {
"reason": "stale_order",
"party": "taker"
}
}
}{
"error": {
"code": "validation_failed",
"message": "stale_order (taker): order timestamp is 12m0s old (max 10m0s)",
"retryable": false,
"details": {
"reason": "stale_order",
"party": "taker"
}
}
}{
"error": {
"code": "validation_failed",
"message": "stale_order (taker): order timestamp is 12m0s old (max 10m0s)",
"retryable": false,
"details": {
"reason": "stale_order",
"party": "taker"
}
}
}获取 RFQ 交易
读取交易的当前状态,这是交易结果的权威来源。
GET
/
v1
/
rfq-trades
/
{tradeId}
Get a trade's status
curl --request GET \
--url https://external-rfq-partner.polymarket.com/v1/rfq-trades/{tradeId} \
--header 'RFQ-Key-Id: <api-key>' \
--header 'RFQ-Signature: <api-key>' \
--header 'RFQ-Timestamp: <api-key>'import requests
url = "https://external-rfq-partner.polymarket.com/v1/rfq-trades/{tradeId}"
headers = {
"RFQ-Key-Id": "<api-key>",
"RFQ-Timestamp": "<api-key>",
"RFQ-Signature": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'RFQ-Key-Id': '<api-key>',
'RFQ-Timestamp': '<api-key>',
'RFQ-Signature': '<api-key>'
}
};
fetch('https://external-rfq-partner.polymarket.com/v1/rfq-trades/{tradeId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://external-rfq-partner.polymarket.com/v1/rfq-trades/{tradeId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"RFQ-Key-Id: <api-key>",
"RFQ-Signature: <api-key>",
"RFQ-Timestamp: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://external-rfq-partner.polymarket.com/v1/rfq-trades/{tradeId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("RFQ-Key-Id", "<api-key>")
req.Header.Add("RFQ-Timestamp", "<api-key>")
req.Header.Add("RFQ-Signature", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://external-rfq-partner.polymarket.com/v1/rfq-trades/{tradeId}")
.header("RFQ-Key-Id", "<api-key>")
.header("RFQ-Timestamp", "<api-key>")
.header("RFQ-Signature", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://external-rfq-partner.polymarket.com/v1/rfq-trades/{tradeId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["RFQ-Key-Id"] = '<api-key>'
request["RFQ-Timestamp"] = '<api-key>'
request["RFQ-Signature"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"tradeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"idempotencyKey": "<string>",
"status": "PENDING",
"createdAt": "2023-11-07T05:31:56Z",
"combo": {
"conditionId": "<string>",
"tokenIdYes": "<string>",
"tokenIdNo": "<string>",
"legs": [
{
"marketId": "<string>",
"outcome": "yes"
}
]
},
"transactionHash": "<string>",
"failureReason": "unknown_account",
"filledAt": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "validation_failed",
"message": "stale_order (taker): order timestamp is 12m0s old (max 10m0s)",
"retryable": false,
"details": {
"reason": "stale_order",
"party": "taker"
}
}
}{
"error": {
"code": "validation_failed",
"message": "stale_order (taker): order timestamp is 12m0s old (max 10m0s)",
"retryable": false,
"details": {
"reason": "stale_order",
"party": "taker"
}
}
}{
"error": {
"code": "validation_failed",
"message": "stale_order (taker): order timestamp is 12m0s old (max 10m0s)",
"retryable": false,
"details": {
"reason": "stale_order",
"party": "taker"
}
}
}{
"error": {
"code": "validation_failed",
"message": "stale_order (taker): order timestamp is 12m0s old (max 10m0s)",
"retryable": false,
"details": {
"reason": "stale_order",
"party": "taker"
}
}
}完整的交易流程请参阅 RFQ 交易合作伙伴 API 指南。
授权
响应
The trade's current status.
Why a REJECTED trade failed. execution_failed is a failure after submission to the exchange.
可用选项:
unknown_account, account_restricted, ofac_blocked, insufficient_balance, insufficient_allowance, dependency_unavailable, invalid_order, token_market_mismatch, stale_order, fee_not_accepted, market_not_tradable, price_out_of_band, price_deviation_exceeded, price_mark_missing, transaction_notional_exceeded, taker_notional_below_minimum, counterparty_notional_exceeded 此页面对您有帮助吗?