Get position request by pubkey
curl --request GET \
--url https://api.worm.wtf/margin/positions/requests/{pubkey}/import requests
url = "https://api.worm.wtf/margin/positions/requests/{pubkey}/"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.worm.wtf/margin/positions/requests/{pubkey}/', 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/requests/{pubkey}/",
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/requests/{pubkey}/"
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/requests/{pubkey}/")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.worm.wtf/margin/positions/requests/{pubkey}/")
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": {
"pubkey": "4mD8rQ2xT7pL1vN6yB3kC9sW5uF0zJ4eR8nM2qP6tLy",
"type": "limit",
"state": "funding_processing",
"message": "Program call payload to open leveraged position.",
"funding_txid": null,
"refund_txid": null,
"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.500000",
"funds": "100.000000",
"price": "0.65",
"shares": "153.846154",
"take_profit_price": "0.75",
"stop_loss_price": "0.58",
"created": 1714300800
},
"meta": {},
"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": -15,
"slug": "not_found",
"message": "Not found.",
"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
Get position request by pubkey
Retrieve a single margin position request by its public key.
GET
/
margin
/
positions
/
requests
/
{pubkey}
/
Get position request by pubkey
curl --request GET \
--url https://api.worm.wtf/margin/positions/requests/{pubkey}/import requests
url = "https://api.worm.wtf/margin/positions/requests/{pubkey}/"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.worm.wtf/margin/positions/requests/{pubkey}/', 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/requests/{pubkey}/",
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/requests/{pubkey}/"
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/requests/{pubkey}/")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.worm.wtf/margin/positions/requests/{pubkey}/")
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": {
"pubkey": "4mD8rQ2xT7pL1vN6yB3kC9sW5uF0zJ4eR8nM2qP6tLy",
"type": "limit",
"state": "funding_processing",
"message": "Program call payload to open leveraged position.",
"funding_txid": null,
"refund_txid": null,
"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.500000",
"funds": "100.000000",
"price": "0.65",
"shares": "153.846154",
"take_profit_price": "0.75",
"stop_loss_price": "0.58",
"created": 1714300800
},
"meta": {},
"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": -15,
"slug": "not_found",
"message": "Not found.",
"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": []
}
}
Cancel a draft request with Cancel position request (
DELETE on the same path).
Path Parameters
Response
Show Data fields
Show Data fields
Position request state: (same set as List position requests).
{
"data": {
"pubkey": "4mD8rQ2xT7pL1vN6yB3kC9sW5uF0zJ4eR8nM2qP6tLy",
"type": "limit",
"state": "funding_processing",
"message": "Program call payload to open leveraged position.",
"funding_txid": null,
"refund_txid": null,
"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.500000",
"funds": "100.000000",
"price": "0.65",
"shares": "153.846154",
"take_profit_price": "0.75",
"stop_loss_price": "0.58",
"created": 1714300800
},
"meta": {},
"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": -15,
"slug": "not_found",
"message": "Not found.",
"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": []
}
}