curl --request POST \
--url https://sandbox-b2b.ripio.com/api/v1/withdrawal-fees/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"currency": "ETH",
"network": "ETHEREUM"
}
'import requests
url = "https://sandbox-b2b.ripio.com/api/v1/withdrawal-fees/"
payload = {
"currency": "ETH",
"network": "ETHEREUM"
}
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({currency: 'ETH', network: 'ETHEREUM'})
};
fetch('https://sandbox-b2b.ripio.com/api/v1/withdrawal-fees/', 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://sandbox-b2b.ripio.com/api/v1/withdrawal-fees/",
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([
'currency' => 'ETH',
'network' => 'ETHEREUM'
]),
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://sandbox-b2b.ripio.com/api/v1/withdrawal-fees/"
payload := strings.NewReader("{\n \"currency\": \"ETH\",\n \"network\": \"ETHEREUM\"\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://sandbox-b2b.ripio.com/api/v1/withdrawal-fees/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"currency\": \"ETH\",\n \"network\": \"ETHEREUM\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-b2b.ripio.com/api/v1/withdrawal-fees/")
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 \"currency\": \"ETH\",\n \"network\": \"ETHEREUM\"\n}"
response = http.request(request)
puts response.read_body{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"gas_price": "0.00001000",
"activation_fee": "0.00000000",
"expires_at": "2022-08-24T14:15:22Z",
"currency": "ETH",
"network_name": "ETHEREUM"
}Create Withdrawal Fee
This endpoint allows the creation of a withdrawal fee. Withdrawal fees are “held fees” offered by Ripio to withdraw assets at a specific fee within a period of time - for example, the option to transfer out 0.25 ETH within the next 15 seconds for 0.001 ETH. The fee does not depend on the withdrawal amount: it is estimated from the currency/network pair. On HYPERCORE, the first transfer to an address that has never received funds also costs a one-off activation fee (1 USDC, converted to the currency): send the destination address so the fee can tell whether it applies, and see activation_fee in the response.
curl --request POST \
--url https://sandbox-b2b.ripio.com/api/v1/withdrawal-fees/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"currency": "ETH",
"network": "ETHEREUM"
}
'import requests
url = "https://sandbox-b2b.ripio.com/api/v1/withdrawal-fees/"
payload = {
"currency": "ETH",
"network": "ETHEREUM"
}
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({currency: 'ETH', network: 'ETHEREUM'})
};
fetch('https://sandbox-b2b.ripio.com/api/v1/withdrawal-fees/', 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://sandbox-b2b.ripio.com/api/v1/withdrawal-fees/",
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([
'currency' => 'ETH',
'network' => 'ETHEREUM'
]),
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://sandbox-b2b.ripio.com/api/v1/withdrawal-fees/"
payload := strings.NewReader("{\n \"currency\": \"ETH\",\n \"network\": \"ETHEREUM\"\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://sandbox-b2b.ripio.com/api/v1/withdrawal-fees/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"currency\": \"ETH\",\n \"network\": \"ETHEREUM\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-b2b.ripio.com/api/v1/withdrawal-fees/")
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 \"currency\": \"ETH\",\n \"network\": \"ETHEREUM\"\n}"
response = http.request(request)
puts response.read_body{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"gas_price": "0.00001000",
"activation_fee": "0.00000000",
"expires_at": "2022-08-24T14:15:22Z",
"currency": "ETH",
"network_name": "ETHEREUM"
}Authorizations
B2B’s White Label API uses OAuth2. Currently there is only one supported authentication flow:
- clientCredentials allows you to access your own B2B account (First-Party Integration) and performs transactions against the public API. This oauth2 flow is well suited for this API, as it allows machine-to-machine communication.
Every call to the API has to be authenticated with an OAuth2 Token. In order to request this token, you will need to have sandbox or production API Keys (client id and client secret) that will be needed to generate a credential in order to negotiate an ephemeral access token.
Every request must be accompianed by an Authorization header with a value that follows the following schema: Bearer ACCESS_TOKEN
Body
Destination address of the later withdrawal. Optional; only HYPERCORE prices anything off it. With an address, the activation fee is charged only if HyperCore has never seen that address, and the withdrawal must then go to that same address. Without one, the activation fee is always charged on HYPERCORE, since it cannot be ruled out.
Response
Created
One-off fee HYPERCORE charges the first transfer to an address that has never received funds, expressed in the requested currency. "0" on every other network, and on HYPERCORE when the address is already active. It is charged on top of the amount and is not subsidized with the gas.
Was this page helpful?