curl --request POST \
--url https://core-api-dev.vanish.trade/commit \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"tx_id": "<string>"
}
'import requests
url = "https://core-api-dev.vanish.trade/commit"
payload = { "tx_id": "<string>" }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({tx_id: '<string>'})
};
fetch('https://core-api-dev.vanish.trade/commit', 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.vanish.trade/commit",
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([
'tx_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://core-api-dev.vanish.trade/commit"
payload := strings.NewReader("{\n \"tx_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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://core-api-dev.vanish.trade/commit")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"tx_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://core-api-dev.vanish.trade/commit")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"tx_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": "pending",
"action_type": "deposit",
"already_processed": true,
"vanish_fee": "<string>",
"tx_fee": "<string>",
"balance_changes": [
{
"token_address": "<string>",
"change": "<string>"
}
],
"screening_eta_seconds": 123
}"<unknown>""<string>"Commit Action
Commits a transaction id of user’s any action (deposit/trade/withdraw) to verify and processes balance change.
curl --request POST \
--url https://core-api-dev.vanish.trade/commit \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"tx_id": "<string>"
}
'import requests
url = "https://core-api-dev.vanish.trade/commit"
payload = { "tx_id": "<string>" }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({tx_id: '<string>'})
};
fetch('https://core-api-dev.vanish.trade/commit', 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.vanish.trade/commit",
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([
'tx_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://core-api-dev.vanish.trade/commit"
payload := strings.NewReader("{\n \"tx_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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://core-api-dev.vanish.trade/commit")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"tx_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://core-api-dev.vanish.trade/commit")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"tx_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": "pending",
"action_type": "deposit",
"already_processed": true,
"vanish_fee": "<string>",
"tx_fee": "<string>",
"balance_changes": [
{
"token_address": "<string>",
"change": "<string>"
}
],
"screening_eta_seconds": 123
}"<unknown>""<string>"Authorizations
Body
Details of the commit request.
The transaction id of any action (trade/deposit/withdraw)
Response
Successful commit response.
State of the transaction and balance after the commit. rejected means a deposit failed compliance or risk screening; funds are refunded to the user's wallet after extended screening.
pending, completed, failed, expired, rejected The type of action that was committed. Indicates whether the operation was a deposit, withdrawal, or trade.
deposit, withdraw, trade Indicates whether the given transaction ID (tx_id) was already processed before this commit attempt.
The fee amount charged by Vanish, expressed in lamports.
The transaction fee amount, expressed in lamports.
A list of token balance changes that resulted from the committed action. Empty if the commit failed or was already processed.
Show child attributes
Show child attributes
Optional. If provided, the estimated time, in seconds, required to screen the commit.
