Transfer a token
curl --request POST \
--url https://omnisafe.sandbox.ecrop.de/omni-safe/v1/transfers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id-in-client": "<string>",
"tokenAddress": "<string>",
"tokenMark": "<string>",
"senderAddress": "<string>",
"recipientAddress": "<string>",
"quantity": 123
}
'import requests
url = "https://omnisafe.sandbox.ecrop.de/omni-safe/v1/transfers"
payload = {
"id-in-client": "<string>",
"tokenAddress": "<string>",
"tokenMark": "<string>",
"senderAddress": "<string>",
"recipientAddress": "<string>",
"quantity": 123
}
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({
'id-in-client': '<string>',
tokenAddress: '<string>',
tokenMark: '<string>',
senderAddress: '<string>',
recipientAddress: '<string>',
quantity: 123
})
};
fetch('https://omnisafe.sandbox.ecrop.de/omni-safe/v1/transfers', 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://omnisafe.sandbox.ecrop.de/omni-safe/v1/transfers",
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([
'id-in-client' => '<string>',
'tokenAddress' => '<string>',
'tokenMark' => '<string>',
'senderAddress' => '<string>',
'recipientAddress' => '<string>',
'quantity' => 123
]),
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://omnisafe.sandbox.ecrop.de/omni-safe/v1/transfers"
payload := strings.NewReader("{\n \"id-in-client\": \"<string>\",\n \"tokenAddress\": \"<string>\",\n \"tokenMark\": \"<string>\",\n \"senderAddress\": \"<string>\",\n \"recipientAddress\": \"<string>\",\n \"quantity\": 123\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://omnisafe.sandbox.ecrop.de/omni-safe/v1/transfers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id-in-client\": \"<string>\",\n \"tokenAddress\": \"<string>\",\n \"tokenMark\": \"<string>\",\n \"senderAddress\": \"<string>\",\n \"recipientAddress\": \"<string>\",\n \"quantity\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://omnisafe.sandbox.ecrop.de/omni-safe/v1/transfers")
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 \"id-in-client\": \"<string>\",\n \"tokenAddress\": \"<string>\",\n \"tokenMark\": \"<string>\",\n \"senderAddress\": \"<string>\",\n \"recipientAddress\": \"<string>\",\n \"quantity\": 123\n}"
response = http.request(request)
puts response.read_body"<string>"Transfer Management
Transfer
This endpoint initiates a token transfer on the blockchain between two wallets. The request body specifies the sender’s wallet address, the recipient’s wallet address, the token to be transferred, and the quantity. Upon successful processing, a transfer ID (id-in-client) is returned. This ID can be used to track the status of the transfer using the getTransferStatus endpoint. Note that while this endpoint initiates the transfer on the blockchain, confirmation may take some time depending on network conditions. If the idInClient already exists, a 409 error will be returned.
POST
/
v1
/
transfers
Transfer a token
curl --request POST \
--url https://omnisafe.sandbox.ecrop.de/omni-safe/v1/transfers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id-in-client": "<string>",
"tokenAddress": "<string>",
"tokenMark": "<string>",
"senderAddress": "<string>",
"recipientAddress": "<string>",
"quantity": 123
}
'import requests
url = "https://omnisafe.sandbox.ecrop.de/omni-safe/v1/transfers"
payload = {
"id-in-client": "<string>",
"tokenAddress": "<string>",
"tokenMark": "<string>",
"senderAddress": "<string>",
"recipientAddress": "<string>",
"quantity": 123
}
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({
'id-in-client': '<string>',
tokenAddress: '<string>',
tokenMark: '<string>',
senderAddress: '<string>',
recipientAddress: '<string>',
quantity: 123
})
};
fetch('https://omnisafe.sandbox.ecrop.de/omni-safe/v1/transfers', 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://omnisafe.sandbox.ecrop.de/omni-safe/v1/transfers",
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([
'id-in-client' => '<string>',
'tokenAddress' => '<string>',
'tokenMark' => '<string>',
'senderAddress' => '<string>',
'recipientAddress' => '<string>',
'quantity' => 123
]),
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://omnisafe.sandbox.ecrop.de/omni-safe/v1/transfers"
payload := strings.NewReader("{\n \"id-in-client\": \"<string>\",\n \"tokenAddress\": \"<string>\",\n \"tokenMark\": \"<string>\",\n \"senderAddress\": \"<string>\",\n \"recipientAddress\": \"<string>\",\n \"quantity\": 123\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://omnisafe.sandbox.ecrop.de/omni-safe/v1/transfers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id-in-client\": \"<string>\",\n \"tokenAddress\": \"<string>\",\n \"tokenMark\": \"<string>\",\n \"senderAddress\": \"<string>\",\n \"recipientAddress\": \"<string>\",\n \"quantity\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://omnisafe.sandbox.ecrop.de/omni-safe/v1/transfers")
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 \"id-in-client\": \"<string>\",\n \"tokenAddress\": \"<string>\",\n \"tokenMark\": \"<string>\",\n \"senderAddress\": \"<string>\",\n \"recipientAddress\": \"<string>\",\n \"quantity\": 123\n}"
response = http.request(request)
puts response.read_body"<string>"Authorizations
Body
application/json
Response
The created transfer transaction
The response is of type string.