Confirm Transfer (beta)
curl --request POST \
--url https://api.moonkey.fun/v1/transfers/{transfer_id}/confirm \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"user_id": "user_26l6ha8syVN8oqmaHaFShTxZ5RC"
}
'import requests
url = "https://api.moonkey.fun/v1/transfers/{transfer_id}/confirm"
payload = { "user_id": "user_26l6ha8syVN8oqmaHaFShTxZ5RC" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({user_id: 'user_26l6ha8syVN8oqmaHaFShTxZ5RC'})
};
fetch('https://api.moonkey.fun/v1/transfers/{transfer_id}/confirm', 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.moonkey.fun/v1/transfers/{transfer_id}/confirm",
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([
'user_id' => 'user_26l6ha8syVN8oqmaHaFShTxZ5RC'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.moonkey.fun/v1/transfers/{transfer_id}/confirm"
payload := strings.NewReader("{\n \"user_id\": \"user_26l6ha8syVN8oqmaHaFShTxZ5RC\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.moonkey.fun/v1/transfers/{transfer_id}/confirm")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"user_id\": \"user_26l6ha8syVN8oqmaHaFShTxZ5RC\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.moonkey.fun/v1/transfers/{transfer_id}/confirm")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"user_id\": \"user_26l6ha8syVN8oqmaHaFShTxZ5RC\"\n}"
response = http.request(request)
puts response.read_body{
"id": "transfer_2DHHNuneKLlqAr1ooaBb531mOy4",
"app_id": "app_25ldv51seNohTaYRsxdfoxMlAa2",
"user_id": "user_26l6ha8syVN8oqmaHaFShTxZ5RC",
"status": "completed",
"source": "wallet_2CxAACd2h0dwzSlsqqyFLsJXCxW",
"source_amount": "0.050005",
"dest": "5H6JCEqnLPjYsoGkBGPaxqrviYKbVrggB7MZTmE1euNA",
"dest_amount": "0.05",
"dest_currency": "solana",
"source_currency": "solana",
"custom_id": null,
"total_fees": "0.000005",
"notes": "test",
"blockchain_tx_hash": "5XaDKrbsCuYP1QyngWuidx4PvwjkPEBXox8Wqt9K8MHT7qTeZ3c6WbSWGkrKXPYvwtfcYuVaTJAVaqNZ8sDRHyHA",
"completed_at": 0,
"cancelled_at": 0,
"expires_at": 1660349172,
"created_at": 1660349052,
"updated_at": 1660349067
}Transfers
Confirm Transfer (beta)
Confirm a transfer to withdraw from wallet. Each transfer expires within 2 minutes to avoid provide the best estimate in the network charge of the specified blockchain.
Returns
A successful response returns a Transfer object with updated status and blockchain_tx. We recommend that you check to make sure status is completed. If status is pending, perform polling on GetTransfer until status is completed or failed.
POST
/
v1
/
transfers
/
{transfer_id}
/
confirm
Confirm Transfer (beta)
curl --request POST \
--url https://api.moonkey.fun/v1/transfers/{transfer_id}/confirm \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"user_id": "user_26l6ha8syVN8oqmaHaFShTxZ5RC"
}
'import requests
url = "https://api.moonkey.fun/v1/transfers/{transfer_id}/confirm"
payload = { "user_id": "user_26l6ha8syVN8oqmaHaFShTxZ5RC" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({user_id: 'user_26l6ha8syVN8oqmaHaFShTxZ5RC'})
};
fetch('https://api.moonkey.fun/v1/transfers/{transfer_id}/confirm', 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.moonkey.fun/v1/transfers/{transfer_id}/confirm",
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([
'user_id' => 'user_26l6ha8syVN8oqmaHaFShTxZ5RC'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.moonkey.fun/v1/transfers/{transfer_id}/confirm"
payload := strings.NewReader("{\n \"user_id\": \"user_26l6ha8syVN8oqmaHaFShTxZ5RC\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.moonkey.fun/v1/transfers/{transfer_id}/confirm")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"user_id\": \"user_26l6ha8syVN8oqmaHaFShTxZ5RC\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.moonkey.fun/v1/transfers/{transfer_id}/confirm")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"user_id\": \"user_26l6ha8syVN8oqmaHaFShTxZ5RC\"\n}"
response = http.request(request)
puts response.read_body{
"id": "transfer_2DHHNuneKLlqAr1ooaBb531mOy4",
"app_id": "app_25ldv51seNohTaYRsxdfoxMlAa2",
"user_id": "user_26l6ha8syVN8oqmaHaFShTxZ5RC",
"status": "completed",
"source": "wallet_2CxAACd2h0dwzSlsqqyFLsJXCxW",
"source_amount": "0.050005",
"dest": "5H6JCEqnLPjYsoGkBGPaxqrviYKbVrggB7MZTmE1euNA",
"dest_amount": "0.05",
"dest_currency": "solana",
"source_currency": "solana",
"custom_id": null,
"total_fees": "0.000005",
"notes": "test",
"blockchain_tx_hash": "5XaDKrbsCuYP1QyngWuidx4PvwjkPEBXox8Wqt9K8MHT7qTeZ3c6WbSWGkrKXPYvwtfcYuVaTJAVaqNZ8sDRHyHA",
"completed_at": 0,
"cancelled_at": 0,
"expires_at": 1660349172,
"created_at": 1660349052,
"updated_at": 1660349067
}Authorizations
Auth Platform API includes all the Auth related features. All Users, Phone Numbers, Emails, and OTPs are associated with an App as the container.
Endpoints only accept App's Secret API keys other than certain endpoints that are used client side or via SDK that accept the public_token.
Authentication using App Api Key
Header:
Authorization: Bearer {api_key}
Authenticated Request
curl \
-X GET https://api.moonkey.fun/v1/auth/users/user_24wFP9pDa9YiMJLun94iKykoZs2 \
-H "Authorization: Bearer sk_test_pRqweh3wvWmJAAVYv7Z0T5iPLzFM4ql0muoyQcjOxGeN3p1r"
Body
application/json
Response
200 - application/json
Confirm Transfer (beta) response