List share splits
curl --request GET \
--url https://api.worm.wtf/share-splits/import requests
url = "https://api.worm.wtf/share-splits/"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.worm.wtf/share-splits/', 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/share-splits/",
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/share-splits/"
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/share-splits/")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.worm.wtf/share-splits/")
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": "HwqEtgeDoWHLqyMQgjwj7BGWmCrZ46m6y5bALMfYcGYY",
"message": "Program call payload to split shares.",
"market_condition_id": "7n9G9WfQ2V7d6hM3XK8pQ4LwR2eY6aT1uJ5cB8mN3qPz",
"state": "done",
"amount": "10.000000",
"onchain_amount": "10.000000",
"created": 1714303300
}
],
"meta": {
"limit": 50,
"next_cursor": "eyJiZWZvcmVfaWQiOjEyMzQ1fQ"
},
"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": []
}
}
Share Splits
List share splits
Retrieve your share splits with optional state and market filters.
GET
/
share-splits
/
List share splits
curl --request GET \
--url https://api.worm.wtf/share-splits/import requests
url = "https://api.worm.wtf/share-splits/"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.worm.wtf/share-splits/', 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/share-splits/",
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/share-splits/"
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/share-splits/")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.worm.wtf/share-splits/")
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": "HwqEtgeDoWHLqyMQgjwj7BGWmCrZ46m6y5bALMfYcGYY",
"message": "Program call payload to split shares.",
"market_condition_id": "7n9G9WfQ2V7d6hM3XK8pQ4LwR2eY6aT1uJ5cB8mN3qPz",
"state": "done",
"amount": "10.000000",
"onchain_amount": "10.000000",
"created": 1714303300
}
],
"meta": {
"limit": 50,
"next_cursor": "eyJiZWZvcmVfaWQiOjEyMzQ1fQ"
},
"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 share splits by market condition id.
string
State filter (lowercase, case-sensitive):
waiting_to_sign, in_process, done, failed, expired.integer
default:"50"
Number of records to return. Range: 1-100.
string
Cursor from
meta.next_cursor (before_id keyset pagination).Response
array
Share split rows, newest first.
Show Data fields
Show Data fields
string
Share split public key.
string | null
Program message from the draft. Sign it while the split is
waiting_to_sign. The value is kept after signing. null only when the draft could not be created (state failed).string
Market condition id.
string
Lifecycle state: (
waiting_to_sign, in_process, done, failed, expired).string
Requested amount.
string | null
Amount settled on chain.
null unless state is done.integer
Created timestamp (Unix seconds).
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": [
{
"pubkey": "HwqEtgeDoWHLqyMQgjwj7BGWmCrZ46m6y5bALMfYcGYY",
"message": "Program call payload to split shares.",
"market_condition_id": "7n9G9WfQ2V7d6hM3XK8pQ4LwR2eY6aT1uJ5cB8mN3qPz",
"state": "done",
"amount": "10.000000",
"onchain_amount": "10.000000",
"created": 1714303300
}
],
"meta": {
"limit": 50,
"next_cursor": "eyJiZWZvcmVfaWQiOjEyMzQ1fQ"
},
"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": []
}
}