curl --request POST \
--url https://core.api.dev.predictstreet.sde.adifoundation.ai/api/me/vault/stray-usdc/return \
--header 'X-Api-Key: <api-key>'import requests
url = "https://core.api.dev.predictstreet.sde.adifoundation.ai/api/me/vault/stray-usdc/return"
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/vault/stray-usdc/return', 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/vault/stray-usdc/return",
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/vault/stray-usdc/return"
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/vault/stray-usdc/return")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://core.api.dev.predictstreet.sde.adifoundation.ai/api/me/vault/stray-usdc/return")
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{
"jobId": "<string>",
"vaultAddress": "<string>",
"status": "pending",
"txHash": "<string>",
"failureKind": "reverted",
"nothingToReturn": true,
"requestedAt": "2023-11-07T05:31:56Z",
"confirmedAt": "2023-11-07T05:31:56Z",
"generation": 1,
"strayUsdc": "1950",
"enqueued": true
}{
"jobId": "<string>",
"vaultAddress": "<string>",
"status": "pending",
"txHash": "<string>",
"failureKind": "reverted",
"nothingToReturn": true,
"requestedAt": "2023-11-07T05:31:56Z",
"confirmedAt": "2023-11-07T05:31:56Z",
"generation": 1,
"strayUsdc": "1950",
"enqueued": true
}{
"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": {}
}
}Return USDC sent to the vault by a plain transfer to the owner wallet (RND-2019)
USDC transferred straight to a vault address (not deposited) is never credited: GET /api/me/vault shows it as strayUsdc. This queues the vault’s sweepOffLedgerERC20(USDC) on the platform relay (no gas for the user): the contract sends everything stray at execution to the wallet that owns the vault — the backend chooses neither amount nor recipient. Default vault: the active one; vault names another of the caller’s vaults.\n\nIdempotent per vault: while a return is in flight a repeat answers that job (enqueued: false, nothing read or queued); once it has ended, a call queues a new one if USDC is stray again. Poll GET /api/me/vault/stray-usdc/return/. On confirmed, /api/me/activity shows a stray_usdc_return row.\n\n202: queued or in flight (body = the job); 200: a call that met a job which had just ended (body = that job). 409 no_stray_usdc: nothing stray (nothing queued). 409 stray_usdc_return_disabled: off on this environment. 400 vault_not_deployed / invalid_vault, 404 vault_not_found. 422 stray_usdc_return_reverted: the simulation reverted; nothing queued. 503 stray_usdc_unavailable (retryAfterSec): the chain could not be read, or returns are paused on the platform side (GET /api/me/vault strayUsdcReturnBlockedBy says so up front) — nothing queued, retry. 503 platform_frozen / withdrawals_frozen (retryAfterSec): the platform or the withdrawals freeze is on — nothing is queued; a return queued before the freeze stays pending (held, not sent) and goes ahead once it lifts, so keep polling its jobId. 429 rate_limited. A queued return the relay has not sent in time (a freeze included) ends expired; ask again.
curl --request POST \
--url https://core.api.dev.predictstreet.sde.adifoundation.ai/api/me/vault/stray-usdc/return \
--header 'X-Api-Key: <api-key>'import requests
url = "https://core.api.dev.predictstreet.sde.adifoundation.ai/api/me/vault/stray-usdc/return"
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/vault/stray-usdc/return', 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/vault/stray-usdc/return",
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/vault/stray-usdc/return"
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/vault/stray-usdc/return")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://core.api.dev.predictstreet.sde.adifoundation.ai/api/me/vault/stray-usdc/return")
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{
"jobId": "<string>",
"vaultAddress": "<string>",
"status": "pending",
"txHash": "<string>",
"failureKind": "reverted",
"nothingToReturn": true,
"requestedAt": "2023-11-07T05:31:56Z",
"confirmedAt": "2023-11-07T05:31:56Z",
"generation": 1,
"strayUsdc": "1950",
"enqueued": true
}{
"jobId": "<string>",
"vaultAddress": "<string>",
"status": "pending",
"txHash": "<string>",
"failureKind": "reverted",
"nothingToReturn": true,
"requestedAt": "2023-11-07T05:31:56Z",
"confirmedAt": "2023-11-07T05:31:56Z",
"generation": 1,
"strayUsdc": "1950",
"enqueued": true
}{
"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"
Query Parameters
Response
The call met the vault's return job just after it ended.
Relay job tracking the return of stray USDC sent to a vault address.