Skip to main content
POST
/
v1
/
account
/
internal-transfer
Internal Transfer
curl --request POST \
  --url https://api.perpetuals.polymarket.com/v1/account/internal-transfer \
  --header 'Content-Type: application/json' \
  --data '
{
  "op": {
    "type": "internalTransfer",
    "args": {
      "account": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266",
      "token": "0xaf88d065e77c8cc2239327c5edb3a432268e5831",
      "amount": "100.00",
      "to": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8"
    }
  },
  "sig": "0x5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a1c",
  "salt": 555555555,
  "ts": 1767000014000,
  "label": "ops-rebalance"
}
'
import requests

url = "https://api.perpetuals.polymarket.com/v1/account/internal-transfer"

payload = {
"op": {
"type": "internalTransfer",
"args": {
"account": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266",
"token": "0xaf88d065e77c8cc2239327c5edb3a432268e5831",
"amount": "100.00",
"to": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8"
}
},
"sig": "0x5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a1c",
"salt": 555555555,
"ts": 1767000014000,
"label": "ops-rebalance"
}
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({
op: {
type: 'internalTransfer',
args: {
account: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266',
token: '0xaf88d065e77c8cc2239327c5edb3a432268e5831',
amount: '100.00',
to: '0x70997970C51812dc3A010C7d01b50e0d17dc79C8'
}
},
sig: '0x5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a1c',
salt: 555555555,
ts: 1767000014000,
label: 'ops-rebalance'
})
};

fetch('https://api.perpetuals.polymarket.com/v1/account/internal-transfer', 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://api.perpetuals.polymarket.com/v1/account/internal-transfer",
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([
'op' => [
'type' => 'internalTransfer',
'args' => [
'account' => '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266',
'token' => '0xaf88d065e77c8cc2239327c5edb3a432268e5831',
'amount' => '100.00',
'to' => '0x70997970C51812dc3A010C7d01b50e0d17dc79C8'
]
],
'sig' => '0x5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a1c',
'salt' => 555555555,
'ts' => 1767000014000,
'label' => 'ops-rebalance'
]),
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://api.perpetuals.polymarket.com/v1/account/internal-transfer"

payload := strings.NewReader("{\n \"op\": {\n \"type\": \"internalTransfer\",\n \"args\": {\n \"account\": \"0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266\",\n \"token\": \"0xaf88d065e77c8cc2239327c5edb3a432268e5831\",\n \"amount\": \"100.00\",\n \"to\": \"0x70997970C51812dc3A010C7d01b50e0d17dc79C8\"\n }\n },\n \"sig\": \"0x5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a1c\",\n \"salt\": 555555555,\n \"ts\": 1767000014000,\n \"label\": \"ops-rebalance\"\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://api.perpetuals.polymarket.com/v1/account/internal-transfer")
.header("Content-Type", "application/json")
.body("{\n \"op\": {\n \"type\": \"internalTransfer\",\n \"args\": {\n \"account\": \"0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266\",\n \"token\": \"0xaf88d065e77c8cc2239327c5edb3a432268e5831\",\n \"amount\": \"100.00\",\n \"to\": \"0x70997970C51812dc3A010C7d01b50e0d17dc79C8\"\n }\n },\n \"sig\": \"0x5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a1c\",\n \"salt\": 555555555,\n \"ts\": 1767000014000,\n \"label\": \"ops-rebalance\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.perpetuals.polymarket.com/v1/account/internal-transfer")

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 \"op\": {\n \"type\": \"internalTransfer\",\n \"args\": {\n \"account\": \"0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266\",\n \"token\": \"0xaf88d065e77c8cc2239327c5edb3a432268e5831\",\n \"amount\": \"100.00\",\n \"to\": \"0x70997970C51812dc3A010C7d01b50e0d17dc79C8\"\n }\n },\n \"sig\": \"0x5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a1c\",\n \"salt\": 555555555,\n \"ts\": 1767000014000,\n \"label\": \"ops-rebalance\"\n}"

response = http.request(request)
puts response.read_body
{
  "status": "ok",
  "transfer_id": 123
}
{
"status": "err",
"error": "insufficient_margin"
}
{
"status": "err",
"transfer_id": 123,
"error": "insufficient_margin"
}
{
"status": "err",
"error": "insufficient_margin"
}
{
"status": "err",
"error": "insufficient_margin"
}
Request Weight: 1

Body

application/json

Internal transfer request.

op
object
required
sig
string
required

Signature in hex format

Example:

"0x1234567890..."

salt
integer
required

Salt

Example:

1234567890

ts
integer
required

Request timestamp. Unix milliseconds for most operations; Unix seconds for withdrawals (must match the on-chain EIP-712 struct verified against block.timestamp).

Example:

1767225600000

label
string

Human-readable label for a proxy key or internal transfer

Example:

"trading-bot"

Response

The accepted transfer, carrying its transfer_id.

status
enum<string>
required
Available options:
ok
transfer_id
integer
required

Internal transfer ID