Submit share split
curl --request POST \
--url https://api.worm.wtf/share-splits/{pubkey}/submit/ \
--header 'Content-Type: application/json' \
--data '
{
"signature": "<string>"
}
'import requests
url = "https://api.worm.wtf/share-splits/{pubkey}/submit/"
payload = { "signature": "<string>" }
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({signature: '<string>'})
};
fetch('https://api.worm.wtf/share-splits/{pubkey}/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://api.worm.wtf/share-splits/{pubkey}/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([
'signature' => '<string>'
]),
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.worm.wtf/share-splits/{pubkey}/submit/"
payload := strings.NewReader("{\n \"signature\": \"<string>\"\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.worm.wtf/share-splits/{pubkey}/submit/")
.header("Content-Type", "application/json")
.body("{\n \"signature\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.worm.wtf/share-splits/{pubkey}/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 \"signature\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"pubkey": "HwqEtgeDoWHLqyMQgjwj7BGWmCrZ46m6y5bALMfYcGYY",
"message": "Program call payload to split shares.",
"market_condition_id": "7n9G9WfQ2V7d6hM3XK8pQ4LwR2eY6aT1uJ5cB8mN3qPz",
"state": "in_process",
"amount": "10.000000",
"onchain_amount": null,
"created": 1714303300
},
"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": 3029,
"slug": "program_call_has_expired",
"message": "The program call has expired. Please request a new one.",
"details": []
}
}
{
"data": null,
"meta": null,
"error": {
"code": 4307,
"slug": "share_conversion_not_found",
"message": "Share conversion not found.",
"details": []
}
}
{
"data": null,
"meta": null,
"error": {
"code": 4308,
"slug": "share_conversion_invalid_state",
"message": "Share conversion must be waiting to sign.",
"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
Submit share split
Submit a signature to finalize the share split.
POST
/
share-splits
/
{pubkey}
/
submit
/
Submit share split
curl --request POST \
--url https://api.worm.wtf/share-splits/{pubkey}/submit/ \
--header 'Content-Type: application/json' \
--data '
{
"signature": "<string>"
}
'import requests
url = "https://api.worm.wtf/share-splits/{pubkey}/submit/"
payload = { "signature": "<string>" }
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({signature: '<string>'})
};
fetch('https://api.worm.wtf/share-splits/{pubkey}/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://api.worm.wtf/share-splits/{pubkey}/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([
'signature' => '<string>'
]),
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.worm.wtf/share-splits/{pubkey}/submit/"
payload := strings.NewReader("{\n \"signature\": \"<string>\"\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.worm.wtf/share-splits/{pubkey}/submit/")
.header("Content-Type", "application/json")
.body("{\n \"signature\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.worm.wtf/share-splits/{pubkey}/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 \"signature\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"pubkey": "HwqEtgeDoWHLqyMQgjwj7BGWmCrZ46m6y5bALMfYcGYY",
"message": "Program call payload to split shares.",
"market_condition_id": "7n9G9WfQ2V7d6hM3XK8pQ4LwR2eY6aT1uJ5cB8mN3qPz",
"state": "in_process",
"amount": "10.000000",
"onchain_amount": null,
"created": 1714303300
},
"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": 3029,
"slug": "program_call_has_expired",
"message": "The program call has expired. Please request a new one.",
"details": []
}
}
{
"data": null,
"meta": null,
"error": {
"code": 4307,
"slug": "share_conversion_not_found",
"message": "Share conversion not found.",
"details": []
}
}
{
"data": null,
"meta": null,
"error": {
"code": 4308,
"slug": "share_conversion_invalid_state",
"message": "Share conversion must be waiting to sign.",
"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": []
}
}
Path Parameters
string
required
The public key of the share split to submit.
Body Parameters
string
required
Hex signature over the share split draft
message from Start share split: the 64-byte ed25519 signature (128 hex characters) of the transaction message, signed the same way as an order draft. A leading 0x is accepted. A full signed transaction is not accepted on this endpoint.Response
The split moves toin_process while the transaction lands. Poll Get share split by pubkey until state is done or failed.
object
Submitted share split row.
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
Empty object on success for this endpoint.
object | null
null on success. Error object on failed requests.Errors
| Status | Slug | When |
|---|---|---|
400 | invalid_request_params | signature is missing, empty or longer than 128 characters. |
400 | program_call_has_expired | The draft expired before it was submitted. Start a new split. |
400 | invalid_program_call_status | The draft can no longer be submitted. Start a new split. |
404 | share_conversion_not_found | No share split with this pubkey belongs to you. |
409 | share_conversion_invalid_state | The share split is no longer waiting_to_sign. |
{
"data": {
"pubkey": "HwqEtgeDoWHLqyMQgjwj7BGWmCrZ46m6y5bALMfYcGYY",
"message": "Program call payload to split shares.",
"market_condition_id": "7n9G9WfQ2V7d6hM3XK8pQ4LwR2eY6aT1uJ5cB8mN3qPz",
"state": "in_process",
"amount": "10.000000",
"onchain_amount": null,
"created": 1714303300
},
"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": 3029,
"slug": "program_call_has_expired",
"message": "The program call has expired. Please request a new one.",
"details": []
}
}
{
"data": null,
"meta": null,
"error": {
"code": 4307,
"slug": "share_conversion_not_found",
"message": "Share conversion not found.",
"details": []
}
}
{
"data": null,
"meta": null,
"error": {
"code": 4308,
"slug": "share_conversion_invalid_state",
"message": "Share conversion must be waiting to sign.",
"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": []
}
}