curl --request POST \
--url https://core.api.dev.predictstreet.sde.adifoundation.ai/api/me/splits-merges/{opId}/unlock \
--header 'X-Api-Key: <api-key>'import requests
url = "https://core.api.dev.predictstreet.sde.adifoundation.ai/api/me/splits-merges/{opId}/unlock"
headers = {"X-Api-Key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://core.api.dev.predictstreet.sde.adifoundation.ai/api/me/splits-merges/{opId}/unlock', 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://core.api.dev.predictstreet.sde.adifoundation.ai/api/me/splits-merges/{opId}/unlock",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <api-key>"
],
]);
$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://core.api.dev.predictstreet.sde.adifoundation.ai/api/me/splits-merges/{opId}/unlock"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://core.api.dev.predictstreet.sde.adifoundation.ai/api/me/splits-merges/{opId}/unlock")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://core.api.dev.predictstreet.sde.adifoundation.ai/api/me/splits-merges/{opId}/unlock")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"signedOpId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"opKind": "SPLIT",
"status": "<string>",
"vaultAddress": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb3",
"deadline": 123,
"refunded": true,
"refundAppliedNow": true,
"updatedAt": "2023-11-07T05:31:56Z",
"reason": "<string>",
"txHash": "<string>"
}{
"status": 400,
"error": {
"code": "bad_request",
"message": "<string>",
"trace_id": "<string>",
"retryAfterSec": 123,
"retryable": true,
"details": {}
}
}{
"status": 400,
"error": {
"code": "bad_request",
"message": "<string>",
"trace_id": "<string>",
"retryAfterSec": 123,
"retryable": true,
"details": {}
}
}{
"status": 400,
"error": {
"code": "bad_request",
"message": "<string>",
"trace_id": "<string>",
"retryAfterSec": 123,
"retryable": true,
"details": {}
}
}{
"status": 400,
"error": {
"code": "bad_request",
"message": "<string>",
"trace_id": "<string>",
"retryAfterSec": 123,
"retryable": true,
"details": {}
}
}{
"status": 400,
"error": {
"code": "bad_request",
"message": "<string>",
"trace_id": "<string>",
"retryAfterSec": 123,
"retryable": true,
"details": {}
}
}{
"status": 400,
"error": {
"code": "bad_request",
"message": "<string>",
"trace_id": "<string>",
"retryAfterSec": 123,
"retryable": true,
"details": {}
}
}{
"status": 400,
"error": {
"code": "bad_request",
"message": "<string>",
"trace_id": "<string>",
"retryAfterSec": 123,
"retryable": true,
"details": {}
}
}Release an EXPIRED split / merge lock after verifying on-chain absence
User-initiated recovery for an EXPIRED dual-signed operation whose balance lock the platform has not released automatically. Releases the lock back to the caller’s balance after verifying that the operation did NOT execute on-chain.
Supported opKind: SPLIT and MERGE. CONVERT / REDEEM follow in subsequent releases.
Gates checked in order (any failure short-circuits with no balance movement):
- Ownership — the authenticated wallet must own the vault the op was signed for (else
403 vault_owner_mismatch). - Op kind — must be
SPLITorMERGE(else400 op_kind_unsupported). - Already terminal — if the op is already terminal, either refunded by some other path (
EXPIRED/CANCELLED/REVERTED/REJECTED/FAILED) orCONFIRMEDon-chain, the call is a200no-op withrefundAppliedNow=falsefor idempotent client retries. - Age —
now - deadline >= 90s(else425 op_too_recent). The 90s safety buffer ensures a tx mined just after the off-chain deadline cannot be double-counted. - Indexing caught up — refuses the release while the platform’s chain indexing is lagging (
503 chain_watcher_lagging/chain_watcher_unreachable/chain_watcher_url_unset; retry later). Without this gate, a confirmed split/merge that is not indexed yet would look like one that never executed and could be credited twice. - Not executed on-chain — if a matching
PositionSplit/PositionsMergedevent exists for the vault, condition and amount, the call returns409 op_confirmed_on_chainwitheventKey/txHash/blockNumberin the errordetails: the operation succeeded, so there is nothing to unlock.
On success the op transitions to EXPIRED and its locked balance is released back to available.
curl --request POST \
--url https://core.api.dev.predictstreet.sde.adifoundation.ai/api/me/splits-merges/{opId}/unlock \
--header 'X-Api-Key: <api-key>'import requests
url = "https://core.api.dev.predictstreet.sde.adifoundation.ai/api/me/splits-merges/{opId}/unlock"
headers = {"X-Api-Key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://core.api.dev.predictstreet.sde.adifoundation.ai/api/me/splits-merges/{opId}/unlock', 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://core.api.dev.predictstreet.sde.adifoundation.ai/api/me/splits-merges/{opId}/unlock",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <api-key>"
],
]);
$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://core.api.dev.predictstreet.sde.adifoundation.ai/api/me/splits-merges/{opId}/unlock"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://core.api.dev.predictstreet.sde.adifoundation.ai/api/me/splits-merges/{opId}/unlock")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://core.api.dev.predictstreet.sde.adifoundation.ai/api/me/splits-merges/{opId}/unlock")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"signedOpId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"opKind": "SPLIT",
"status": "<string>",
"vaultAddress": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb3",
"deadline": 123,
"refunded": true,
"refundAppliedNow": true,
"updatedAt": "2023-11-07T05:31:56Z",
"reason": "<string>",
"txHash": "<string>"
}{
"status": 400,
"error": {
"code": "bad_request",
"message": "<string>",
"trace_id": "<string>",
"retryAfterSec": 123,
"retryable": true,
"details": {}
}
}{
"status": 400,
"error": {
"code": "bad_request",
"message": "<string>",
"trace_id": "<string>",
"retryAfterSec": 123,
"retryable": true,
"details": {}
}
}{
"status": 400,
"error": {
"code": "bad_request",
"message": "<string>",
"trace_id": "<string>",
"retryAfterSec": 123,
"retryable": true,
"details": {}
}
}{
"status": 400,
"error": {
"code": "bad_request",
"message": "<string>",
"trace_id": "<string>",
"retryAfterSec": 123,
"retryable": true,
"details": {}
}
}{
"status": 400,
"error": {
"code": "bad_request",
"message": "<string>",
"trace_id": "<string>",
"retryAfterSec": 123,
"retryable": true,
"details": {}
}
}{
"status": 400,
"error": {
"code": "bad_request",
"message": "<string>",
"trace_id": "<string>",
"retryAfterSec": 123,
"retryable": true,
"details": {}
}
}{
"status": 400,
"error": {
"code": "bad_request",
"message": "<string>",
"trace_id": "<string>",
"retryAfterSec": 123,
"retryable": true,
"details": {}
}
}Authorizations
Partner / integrator key — format ps_live_<keyId>_<secret>. Partner keys are issued by PredictStreet; a user can also create keys bound to their own wallet from their account settings in the web app. Never ship to a browser. multi_wallet partners must additionally send X-User-Wallet: 0x<40-hex> on every authenticated request to declare the acting wallet. See the API keys guide for scope taxonomy, partner kinds, rate limits, and rotation procedure.
Headers
Required for multi_wallet partners on every authenticated request; ignored for single_wallet. Declares the acting end-user wallet for this request — drives KYC checks, balances/positions/orders attribution, rate-limit buckets, and audit. Lower-cased server-side. Missing on a multi_wallet key → 401 api_key_user_wallet_required; malformed → 401 api_key_user_wallet_invalid. The on-chain CTFExchange/Vault contracts still verify EIP-712 signer ↔ vault binding, so loosening API-layer attribution is safe by construction.
^0x[a-fA-F0-9]{40}$"0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb3"
Path Parameters
Operation id (signedOpId, UUID) returned by the original split / merge / convert signature endpoint.
Response
Refund applied, or no-op snapshot of an already-terminal op (use refundAppliedNow to distinguish).
Operation id — the same UUID the original signature endpoint returned.
Operation kind. Always SPLIT or MERGE on success — other kinds short-circuit with 400 op_kind_unsupported.
SPLIT, MERGE Post-call status. EXPIRED after a successful refund; whatever the op was already in (EXPIRED / CANCELLED / REVERTED / REJECTED / FAILED, or CONFIRMED) on an idempotent re-request.
^0x[a-fA-F0-9]{40}$"0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb3"
Unix seconds the op was signed against. Always more than 90s in the past on a successful response.
Whether the op's lock has been refunded, after this call — true for any EXPIRED/CANCELLED/REVERTED/REJECTED/FAILED terminal, false for CONFIRMED.
true if this call performed the refund transition; false for an idempotent re-request against an already-terminal op (the row is returned unchanged).
ISO-8601 timestamp of the op's last state change.
Audit string — set to user:<vaultAddress> after a successful refund by this endpoint; other values on ops refunded by other paths.
Transaction hash recorded for the op, if any — null for an op that never confirmed on-chain, which is every op this endpoint refunds.