Skip to main content
POST
/
submit
Submit a transaction
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"
}

Headers

POLY_BUILDER_API_KEY
string

Builder API key (when using Builder API Key auth)

POLY_BUILDER_TIMESTAMP
string

Unix timestamp (when using Builder API Key auth)

POLY_BUILDER_PASSPHRASE
string

Builder passphrase (when using Builder API Key auth)

POLY_BUILDER_SIGNATURE
string

HMAC-SHA256 signature (when using Builder API Key auth)

RELAYER_API_KEY
string

Relayer API key (when using Relayer API Key auth)

RELAYER_API_KEY_ADDRESS
string

Address that owns the key (when using Relayer API Key auth) Ethereum address (0x-prefixed, 40 hex chars)

Pattern: ^0x[a-fA-F0-9]{40}$
Example:

"0x6e0c80c90ea6c15917308F820Eac91Ce2724B5b5"

Body

application/json
from
string
required

Signer address

Pattern: ^0x[a-fA-F0-9]{40}$
Example:

"0x6e0c80c90ea6c15917308F820Eac91Ce2724B5b5"

to
string
required

Target contract address

Pattern: ^0x[a-fA-F0-9]{40}$
Example:

"0x6e0c80c90ea6c15917308F820Eac91Ce2724B5b5"

proxyWallet
string
required

User's Polymarket proxy wallet address

Pattern: ^0x[a-fA-F0-9]{40}$
Example:

"0x6e0c80c90ea6c15917308F820Eac91Ce2724B5b5"

data
string
required

Encoded transaction data (0x-prefixed hex string)

Example:

"0x..."

nonce
string
required

Transaction nonce

Example:

"60"

signature
string
required

Transaction signature (0x-prefixed hex string)

Example:

"0x01a060c734d7bdf4adde50c4a7e574036b1f8b12890911bdd1c1cfdcd77502381b89fa8a47c36f62a0b9f1cdfee7b260fd8108536db9f6b2089c02637e7de9fc20"

signatureParams
object
required
type
enum<string>
required

Transaction type

Available options:
SAFE,
PROXY
Example:

"SAFE"

Response

Transaction submitted successfully

transactionID
string

Unique identifier for the submitted transaction

Example:

"0190b317-a1d3-7bec-9b91-eeb6dcd3a620"

state
string

Current state of the transaction

Example:

"STATE_NEW"