List margin settlements
curl --request GET \
--url https://api.worm.wtf/margin/positions/settlements/import requests
url = "https://api.worm.wtf/margin/positions/settlements/"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.worm.wtf/margin/positions/settlements/', 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.worm.wtf/margin/positions/settlements/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://api.worm.wtf/margin/positions/settlements/"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.worm.wtf/margin/positions/settlements/")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.worm.wtf/margin/positions/settlements/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": [
{
"position_pubkey": "8pT3nW6kQ1rM9yB4cL7vF2zX5uJ0eR3sN6dQ2mP8tHy",
"position": {
"pubkey": "8pT3nW6kQ1rM9yB4cL7vF2zX5uJ0eR3sN6dQ2mP8tHy",
"position_request_pubkey": "4mD8rQ2xT7pL1vN6yB3kC9sW5uF0zJ4eR8nM2qP6tLy",
"market": {
"title": "Will the Atlanta Hawks beat the New York Knicks in the NBA game on April 28, 2026?",
"condition_id": "7n9G9WfQ2V7d6hM3XK8pQ4LwR2eY6aT1uJ5cB8mN3qPz",
"logo": null,
"last_trade_price": "0.68",
"event": null
},
"is_yes": true,
"leverage": "2.000000",
"total_shares": "100.000000",
"avg_entry_price": "0.65",
"closing_price": "0.72",
"realized_pnl": "7.000000",
"user_liquidity": "50.000000",
"total_liquidity": "100.000000",
"liquidation_price": "0.400000",
"unrealized_pnl": null,
"is_closed": true,
"is_liquidated": false,
"is_claimed": false,
"tp_sl": null,
"created": 1714300000
},
"total_pnl": "123.45",
"user_liquidity": "100.00",
"state": "claimable",
"created": 1714303000
}
],
"meta": {
"limit": 50,
"next_cursor": "eyJwdWJrZXkiOiI4cFQzblc2a1Exck05eUI0Y0w3dkYyelg1dUowZVIzc042ZFEybVA4dEh5Iiwic29ydF92YWx1ZSI6MTcxNDMwMDgwMH0"
},
"error": null
}
{
"data": null,
"meta": null,
"error": {
"code": -11,
"slug": "invalid_request_params",
"message": "Validation Error",
"details": []
}
}
{
"data": null,
"meta": null,
"error": {
"code": -12,
"slug": "authentication_failed",
"message": "Invalid signature",
"details": []
}
}
{
"data": null,
"meta": null,
"error": {
"code": -14,
"slug": "permission_denied",
"message": "You do not have permission to perform this action.",
"details": []
}
}
{
"data": null,
"meta": null,
"error": {
"code": -17,
"slug": "throttled",
"message": "Request was throttled.",
"details": []
}
}
{
"data": null,
"meta": null,
"error": {
"code": -3,
"slug": "internal_error",
"message": "An internal error occurred.",
"details": []
}
}
Margin
List margin settlements
Retrieve margin settlement records with optional filters and pagination.
GET
/
margin
/
positions
/
settlements
/
List margin settlements
curl --request GET \
--url https://api.worm.wtf/margin/positions/settlements/import requests
url = "https://api.worm.wtf/margin/positions/settlements/"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.worm.wtf/margin/positions/settlements/', 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.worm.wtf/margin/positions/settlements/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://api.worm.wtf/margin/positions/settlements/"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.worm.wtf/margin/positions/settlements/")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.worm.wtf/margin/positions/settlements/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": [
{
"position_pubkey": "8pT3nW6kQ1rM9yB4cL7vF2zX5uJ0eR3sN6dQ2mP8tHy",
"position": {
"pubkey": "8pT3nW6kQ1rM9yB4cL7vF2zX5uJ0eR3sN6dQ2mP8tHy",
"position_request_pubkey": "4mD8rQ2xT7pL1vN6yB3kC9sW5uF0zJ4eR8nM2qP6tLy",
"market": {
"title": "Will the Atlanta Hawks beat the New York Knicks in the NBA game on April 28, 2026?",
"condition_id": "7n9G9WfQ2V7d6hM3XK8pQ4LwR2eY6aT1uJ5cB8mN3qPz",
"logo": null,
"last_trade_price": "0.68",
"event": null
},
"is_yes": true,
"leverage": "2.000000",
"total_shares": "100.000000",
"avg_entry_price": "0.65",
"closing_price": "0.72",
"realized_pnl": "7.000000",
"user_liquidity": "50.000000",
"total_liquidity": "100.000000",
"liquidation_price": "0.400000",
"unrealized_pnl": null,
"is_closed": true,
"is_liquidated": false,
"is_claimed": false,
"tp_sl": null,
"created": 1714300000
},
"total_pnl": "123.45",
"user_liquidity": "100.00",
"state": "claimable",
"created": 1714303000
}
],
"meta": {
"limit": 50,
"next_cursor": "eyJwdWJrZXkiOiI4cFQzblc2a1Exck05eUI0Y0w3dkYyelg1dUowZVIzc042ZFEybVA4dEh5Iiwic29ydF92YWx1ZSI6MTcxNDMwMDgwMH0"
},
"error": null
}
{
"data": null,
"meta": null,
"error": {
"code": -11,
"slug": "invalid_request_params",
"message": "Validation Error",
"details": []
}
}
{
"data": null,
"meta": null,
"error": {
"code": -12,
"slug": "authentication_failed",
"message": "Invalid signature",
"details": []
}
}
{
"data": null,
"meta": null,
"error": {
"code": -14,
"slug": "permission_denied",
"message": "You do not have permission to perform this action.",
"details": []
}
}
{
"data": null,
"meta": null,
"error": {
"code": -17,
"slug": "throttled",
"message": "Request was throttled.",
"details": []
}
}
{
"data": null,
"meta": null,
"error": {
"code": -3,
"slug": "internal_error",
"message": "An internal error occurred.",
"details": []
}
}
Query Parameters
string
Filter settlements by position pubkey.
string
Filter settlements by market condition id.
string
Comma-separated settlement states (case-insensitive). Each value is one of
created, settlement_pending, claimable, claim_pending, done. Filters apply across the full list; unsupported combinations may return a validation error.string
Filter by margin market lifecycle (case-insensitive). On merged Polymarket + Hyperliquid lists, only values supported by both backends are accepted:
open, resolved.number
Filter by position leverage.
string
default:"-created"
Exactly
created or -created (default -created).integer
default:"50"
Number of records to return. Range: 1-100.
string
Opaque cursor from
meta.next_cursor. See Pagination.Response
array
Margin settlement rows.
Show Data fields
Show Data fields
object | null
Pagination for this list:
limit and next_cursor. See Pagination. On error responses, meta is null.object | null
null on success. Error object on failed requests.{
"data": [
{
"position_pubkey": "8pT3nW6kQ1rM9yB4cL7vF2zX5uJ0eR3sN6dQ2mP8tHy",
"position": {
"pubkey": "8pT3nW6kQ1rM9yB4cL7vF2zX5uJ0eR3sN6dQ2mP8tHy",
"position_request_pubkey": "4mD8rQ2xT7pL1vN6yB3kC9sW5uF0zJ4eR8nM2qP6tLy",
"market": {
"title": "Will the Atlanta Hawks beat the New York Knicks in the NBA game on April 28, 2026?",
"condition_id": "7n9G9WfQ2V7d6hM3XK8pQ4LwR2eY6aT1uJ5cB8mN3qPz",
"logo": null,
"last_trade_price": "0.68",
"event": null
},
"is_yes": true,
"leverage": "2.000000",
"total_shares": "100.000000",
"avg_entry_price": "0.65",
"closing_price": "0.72",
"realized_pnl": "7.000000",
"user_liquidity": "50.000000",
"total_liquidity": "100.000000",
"liquidation_price": "0.400000",
"unrealized_pnl": null,
"is_closed": true,
"is_liquidated": false,
"is_claimed": false,
"tp_sl": null,
"created": 1714300000
},
"total_pnl": "123.45",
"user_liquidity": "100.00",
"state": "claimable",
"created": 1714303000
}
],
"meta": {
"limit": 50,
"next_cursor": "eyJwdWJrZXkiOiI4cFQzblc2a1Exck05eUI0Y0w3dkYyelg1dUowZVIzc042ZFEybVA4dEh5Iiwic29ydF92YWx1ZSI6MTcxNDMwMDgwMH0"
},
"error": null
}
{
"data": null,
"meta": null,
"error": {
"code": -11,
"slug": "invalid_request_params",
"message": "Validation Error",
"details": []
}
}
{
"data": null,
"meta": null,
"error": {
"code": -12,
"slug": "authentication_failed",
"message": "Invalid signature",
"details": []
}
}
{
"data": null,
"meta": null,
"error": {
"code": -14,
"slug": "permission_denied",
"message": "You do not have permission to perform this action.",
"details": []
}
}
{
"data": null,
"meta": null,
"error": {
"code": -17,
"slug": "throttled",
"message": "Request was throttled.",
"details": []
}
}
{
"data": null,
"meta": null,
"error": {
"code": -3,
"slug": "internal_error",
"message": "An internal error occurred.",
"details": []
}
}