curl --request POST \
--url https://relayer-v2.polymarket.com/submit \
--header 'Content-Type: application/json' \
--data '
{
"from": "0x6e0c80c90ea6c15917308F820Eac91Ce2724B5b5",
"to": "0xC011a7E12a19f7B1f670d46F03B03f3342E82DFB",
"proxyWallet": "0x6d8c4e9aDF5748Af82Dabe2C6225207770d6B4fa",
"data": "0x...",
"nonce": "60",
"signature": "0x01a060c734d7bdf4adde50c4a7e574036b1f8b12890911bdd1c1cfdcd77502381b89fa8a47c36f62a0b9f1cdfee7b260fd8108536db9f6b2089c02637e7de9fc20",
"signatureParams": {
"gasPrice": "0",
"operation": "0",
"safeTxnGas": "0",
"baseGas": "0",
"gasToken": "0x0000000000000000000000000000000000000000",
"refundReceiver": "0x0000000000000000000000000000000000000000"
},
"type": "SAFE"
}
'import requests
url = "https://relayer-v2.polymarket.com/submit"
payload = {
"from": "0x6e0c80c90ea6c15917308F820Eac91Ce2724B5b5",
"to": "0xC011a7E12a19f7B1f670d46F03B03f3342E82DFB",
"proxyWallet": "0x6d8c4e9aDF5748Af82Dabe2C6225207770d6B4fa",
"data": "0x...",
"nonce": "60",
"signature": "0x01a060c734d7bdf4adde50c4a7e574036b1f8b12890911bdd1c1cfdcd77502381b89fa8a47c36f62a0b9f1cdfee7b260fd8108536db9f6b2089c02637e7de9fc20",
"signatureParams": {
"gasPrice": "0",
"operation": "0",
"safeTxnGas": "0",
"baseGas": "0",
"gasToken": "0x0000000000000000000000000000000000000000",
"refundReceiver": "0x0000000000000000000000000000000000000000"
},
"type": "SAFE"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
from: '0x6e0c80c90ea6c15917308F820Eac91Ce2724B5b5',
to: '0xC011a7E12a19f7B1f670d46F03B03f3342E82DFB',
proxyWallet: '0x6d8c4e9aDF5748Af82Dabe2C6225207770d6B4fa',
data: '0x...',
nonce: '60',
signature: '0x01a060c734d7bdf4adde50c4a7e574036b1f8b12890911bdd1c1cfdcd77502381b89fa8a47c36f62a0b9f1cdfee7b260fd8108536db9f6b2089c02637e7de9fc20',
signatureParams: {
gasPrice: '0',
operation: '0',
safeTxnGas: '0',
baseGas: '0',
gasToken: '0x0000000000000000000000000000000000000000',
refundReceiver: '0x0000000000000000000000000000000000000000'
},
type: 'SAFE'
})
};
fetch('https://relayer-v2.polymarket.com/submit', 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://relayer-v2.polymarket.com/submit",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'from' => '0x6e0c80c90ea6c15917308F820Eac91Ce2724B5b5',
'to' => '0xC011a7E12a19f7B1f670d46F03B03f3342E82DFB',
'proxyWallet' => '0x6d8c4e9aDF5748Af82Dabe2C6225207770d6B4fa',
'data' => '0x...',
'nonce' => '60',
'signature' => '0x01a060c734d7bdf4adde50c4a7e574036b1f8b12890911bdd1c1cfdcd77502381b89fa8a47c36f62a0b9f1cdfee7b260fd8108536db9f6b2089c02637e7de9fc20',
'signatureParams' => [
'gasPrice' => '0',
'operation' => '0',
'safeTxnGas' => '0',
'baseGas' => '0',
'gasToken' => '0x0000000000000000000000000000000000000000',
'refundReceiver' => '0x0000000000000000000000000000000000000000'
],
'type' => 'SAFE'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://relayer-v2.polymarket.com/submit"
payload := strings.NewReader("{\n \"from\": \"0x6e0c80c90ea6c15917308F820Eac91Ce2724B5b5\",\n \"to\": \"0xC011a7E12a19f7B1f670d46F03B03f3342E82DFB\",\n \"proxyWallet\": \"0x6d8c4e9aDF5748Af82Dabe2C6225207770d6B4fa\",\n \"data\": \"0x...\",\n \"nonce\": \"60\",\n \"signature\": \"0x01a060c734d7bdf4adde50c4a7e574036b1f8b12890911bdd1c1cfdcd77502381b89fa8a47c36f62a0b9f1cdfee7b260fd8108536db9f6b2089c02637e7de9fc20\",\n \"signatureParams\": {\n \"gasPrice\": \"0\",\n \"operation\": \"0\",\n \"safeTxnGas\": \"0\",\n \"baseGas\": \"0\",\n \"gasToken\": \"0x0000000000000000000000000000000000000000\",\n \"refundReceiver\": \"0x0000000000000000000000000000000000000000\"\n },\n \"type\": \"SAFE\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://relayer-v2.polymarket.com/submit")
.header("Content-Type", "application/json")
.body("{\n \"from\": \"0x6e0c80c90ea6c15917308F820Eac91Ce2724B5b5\",\n \"to\": \"0xC011a7E12a19f7B1f670d46F03B03f3342E82DFB\",\n \"proxyWallet\": \"0x6d8c4e9aDF5748Af82Dabe2C6225207770d6B4fa\",\n \"data\": \"0x...\",\n \"nonce\": \"60\",\n \"signature\": \"0x01a060c734d7bdf4adde50c4a7e574036b1f8b12890911bdd1c1cfdcd77502381b89fa8a47c36f62a0b9f1cdfee7b260fd8108536db9f6b2089c02637e7de9fc20\",\n \"signatureParams\": {\n \"gasPrice\": \"0\",\n \"operation\": \"0\",\n \"safeTxnGas\": \"0\",\n \"baseGas\": \"0\",\n \"gasToken\": \"0x0000000000000000000000000000000000000000\",\n \"refundReceiver\": \"0x0000000000000000000000000000000000000000\"\n },\n \"type\": \"SAFE\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://relayer-v2.polymarket.com/submit")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"from\": \"0x6e0c80c90ea6c15917308F820Eac91Ce2724B5b5\",\n \"to\": \"0xC011a7E12a19f7B1f670d46F03B03f3342E82DFB\",\n \"proxyWallet\": \"0x6d8c4e9aDF5748Af82Dabe2C6225207770d6B4fa\",\n \"data\": \"0x...\",\n \"nonce\": \"60\",\n \"signature\": \"0x01a060c734d7bdf4adde50c4a7e574036b1f8b12890911bdd1c1cfdcd77502381b89fa8a47c36f62a0b9f1cdfee7b260fd8108536db9f6b2089c02637e7de9fc20\",\n \"signatureParams\": {\n \"gasPrice\": \"0\",\n \"operation\": \"0\",\n \"safeTxnGas\": \"0\",\n \"baseGas\": \"0\",\n \"gasToken\": \"0x0000000000000000000000000000000000000000\",\n \"refundReceiver\": \"0x0000000000000000000000000000000000000000\"\n },\n \"type\": \"SAFE\"\n}"
response = http.request(request)
puts response.read_body{
"transactionID": "0190b317-a1d3-7bec-9b91-eeb6dcd3a620",
"state": "STATE_NEW"
}提交交易
Submit a transaction request to the Relayer. Authenticated using Builder API Keys or Relayer API Keys.
Returns immediately with the transactionID and a state of STATE_NEW. The onchain transaction hash is not included in this response — poll GET /transaction with the returned transactionID to retrieve the transactionHash once the transaction has been broadcast.
Builder API Key auth headers:
POLY_BUILDER_API_KEYPOLY_BUILDER_TIMESTAMPPOLY_BUILDER_PASSPHRASEPOLY_BUILDER_SIGNATURE
Relayer API Key auth headers:
RELAYER_API_KEYRELAYER_API_KEY_ADDRESS
curl --request POST \
--url https://relayer-v2.polymarket.com/submit \
--header 'Content-Type: application/json' \
--data '
{
"from": "0x6e0c80c90ea6c15917308F820Eac91Ce2724B5b5",
"to": "0xC011a7E12a19f7B1f670d46F03B03f3342E82DFB",
"proxyWallet": "0x6d8c4e9aDF5748Af82Dabe2C6225207770d6B4fa",
"data": "0x...",
"nonce": "60",
"signature": "0x01a060c734d7bdf4adde50c4a7e574036b1f8b12890911bdd1c1cfdcd77502381b89fa8a47c36f62a0b9f1cdfee7b260fd8108536db9f6b2089c02637e7de9fc20",
"signatureParams": {
"gasPrice": "0",
"operation": "0",
"safeTxnGas": "0",
"baseGas": "0",
"gasToken": "0x0000000000000000000000000000000000000000",
"refundReceiver": "0x0000000000000000000000000000000000000000"
},
"type": "SAFE"
}
'import requests
url = "https://relayer-v2.polymarket.com/submit"
payload = {
"from": "0x6e0c80c90ea6c15917308F820Eac91Ce2724B5b5",
"to": "0xC011a7E12a19f7B1f670d46F03B03f3342E82DFB",
"proxyWallet": "0x6d8c4e9aDF5748Af82Dabe2C6225207770d6B4fa",
"data": "0x...",
"nonce": "60",
"signature": "0x01a060c734d7bdf4adde50c4a7e574036b1f8b12890911bdd1c1cfdcd77502381b89fa8a47c36f62a0b9f1cdfee7b260fd8108536db9f6b2089c02637e7de9fc20",
"signatureParams": {
"gasPrice": "0",
"operation": "0",
"safeTxnGas": "0",
"baseGas": "0",
"gasToken": "0x0000000000000000000000000000000000000000",
"refundReceiver": "0x0000000000000000000000000000000000000000"
},
"type": "SAFE"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
from: '0x6e0c80c90ea6c15917308F820Eac91Ce2724B5b5',
to: '0xC011a7E12a19f7B1f670d46F03B03f3342E82DFB',
proxyWallet: '0x6d8c4e9aDF5748Af82Dabe2C6225207770d6B4fa',
data: '0x...',
nonce: '60',
signature: '0x01a060c734d7bdf4adde50c4a7e574036b1f8b12890911bdd1c1cfdcd77502381b89fa8a47c36f62a0b9f1cdfee7b260fd8108536db9f6b2089c02637e7de9fc20',
signatureParams: {
gasPrice: '0',
operation: '0',
safeTxnGas: '0',
baseGas: '0',
gasToken: '0x0000000000000000000000000000000000000000',
refundReceiver: '0x0000000000000000000000000000000000000000'
},
type: 'SAFE'
})
};
fetch('https://relayer-v2.polymarket.com/submit', 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://relayer-v2.polymarket.com/submit",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'from' => '0x6e0c80c90ea6c15917308F820Eac91Ce2724B5b5',
'to' => '0xC011a7E12a19f7B1f670d46F03B03f3342E82DFB',
'proxyWallet' => '0x6d8c4e9aDF5748Af82Dabe2C6225207770d6B4fa',
'data' => '0x...',
'nonce' => '60',
'signature' => '0x01a060c734d7bdf4adde50c4a7e574036b1f8b12890911bdd1c1cfdcd77502381b89fa8a47c36f62a0b9f1cdfee7b260fd8108536db9f6b2089c02637e7de9fc20',
'signatureParams' => [
'gasPrice' => '0',
'operation' => '0',
'safeTxnGas' => '0',
'baseGas' => '0',
'gasToken' => '0x0000000000000000000000000000000000000000',
'refundReceiver' => '0x0000000000000000000000000000000000000000'
],
'type' => 'SAFE'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://relayer-v2.polymarket.com/submit"
payload := strings.NewReader("{\n \"from\": \"0x6e0c80c90ea6c15917308F820Eac91Ce2724B5b5\",\n \"to\": \"0xC011a7E12a19f7B1f670d46F03B03f3342E82DFB\",\n \"proxyWallet\": \"0x6d8c4e9aDF5748Af82Dabe2C6225207770d6B4fa\",\n \"data\": \"0x...\",\n \"nonce\": \"60\",\n \"signature\": \"0x01a060c734d7bdf4adde50c4a7e574036b1f8b12890911bdd1c1cfdcd77502381b89fa8a47c36f62a0b9f1cdfee7b260fd8108536db9f6b2089c02637e7de9fc20\",\n \"signatureParams\": {\n \"gasPrice\": \"0\",\n \"operation\": \"0\",\n \"safeTxnGas\": \"0\",\n \"baseGas\": \"0\",\n \"gasToken\": \"0x0000000000000000000000000000000000000000\",\n \"refundReceiver\": \"0x0000000000000000000000000000000000000000\"\n },\n \"type\": \"SAFE\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://relayer-v2.polymarket.com/submit")
.header("Content-Type", "application/json")
.body("{\n \"from\": \"0x6e0c80c90ea6c15917308F820Eac91Ce2724B5b5\",\n \"to\": \"0xC011a7E12a19f7B1f670d46F03B03f3342E82DFB\",\n \"proxyWallet\": \"0x6d8c4e9aDF5748Af82Dabe2C6225207770d6B4fa\",\n \"data\": \"0x...\",\n \"nonce\": \"60\",\n \"signature\": \"0x01a060c734d7bdf4adde50c4a7e574036b1f8b12890911bdd1c1cfdcd77502381b89fa8a47c36f62a0b9f1cdfee7b260fd8108536db9f6b2089c02637e7de9fc20\",\n \"signatureParams\": {\n \"gasPrice\": \"0\",\n \"operation\": \"0\",\n \"safeTxnGas\": \"0\",\n \"baseGas\": \"0\",\n \"gasToken\": \"0x0000000000000000000000000000000000000000\",\n \"refundReceiver\": \"0x0000000000000000000000000000000000000000\"\n },\n \"type\": \"SAFE\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://relayer-v2.polymarket.com/submit")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"from\": \"0x6e0c80c90ea6c15917308F820Eac91Ce2724B5b5\",\n \"to\": \"0xC011a7E12a19f7B1f670d46F03B03f3342E82DFB\",\n \"proxyWallet\": \"0x6d8c4e9aDF5748Af82Dabe2C6225207770d6B4fa\",\n \"data\": \"0x...\",\n \"nonce\": \"60\",\n \"signature\": \"0x01a060c734d7bdf4adde50c4a7e574036b1f8b12890911bdd1c1cfdcd77502381b89fa8a47c36f62a0b9f1cdfee7b260fd8108536db9f6b2089c02637e7de9fc20\",\n \"signatureParams\": {\n \"gasPrice\": \"0\",\n \"operation\": \"0\",\n \"safeTxnGas\": \"0\",\n \"baseGas\": \"0\",\n \"gasToken\": \"0x0000000000000000000000000000000000000000\",\n \"refundReceiver\": \"0x0000000000000000000000000000000000000000\"\n },\n \"type\": \"SAFE\"\n}"
response = http.request(request)
puts response.read_body{
"transactionID": "0190b317-a1d3-7bec-9b91-eeb6dcd3a620",
"state": "STATE_NEW"
}请求头
Builder API key (when using Builder API Key auth)
Unix timestamp (when using Builder API Key auth)
Builder passphrase (when using Builder API Key auth)
HMAC-SHA256 signature (when using Builder API Key auth)
Relayer API key (when using Relayer API Key auth)
Address that owns the key (when using Relayer API Key auth) Ethereum address (0x-prefixed, 40 hex chars)
^0x[a-fA-F0-9]{40}$"0x6e0c80c90ea6c15917308F820Eac91Ce2724B5b5"
请求体
Signer address
^0x[a-fA-F0-9]{40}$"0x6e0c80c90ea6c15917308F820Eac91Ce2724B5b5"
Target contract address
^0x[a-fA-F0-9]{40}$"0x6e0c80c90ea6c15917308F820Eac91Ce2724B5b5"
User's Polymarket proxy wallet address
^0x[a-fA-F0-9]{40}$"0x6e0c80c90ea6c15917308F820Eac91Ce2724B5b5"
Encoded transaction data (0x-prefixed hex string)
"0x..."
Transaction nonce
"60"
Transaction signature (0x-prefixed hex string)
"0x01a060c734d7bdf4adde50c4a7e574036b1f8b12890911bdd1c1cfdcd77502381b89fa8a47c36f62a0b9f1cdfee7b260fd8108536db9f6b2089c02637e7de9fc20"
Show child attributes
Show child attributes
Transaction type
SAFE, PROXY "SAFE"
此页面对您有帮助吗?