Pular para o conteúdo principal
GET
/
v1
/
organizations
/
{organization_id}
/
ledgers
/
{ledger_id}
/
asset-rates
/
{external_id}
Obter uma Taxa de Ativo por ID Externo
curl --request GET \
  --url https://ledger.sandbox.lerian.net/v1/organizations/{organization_id}/ledgers/{ledger_id}/asset-rates/{external_id}
import requests

url = "https://ledger.sandbox.lerian.net/v1/organizations/{organization_id}/ledgers/{ledger_id}/asset-rates/{external_id}"

response = requests.get(url)

print(response.text)
const options = {method: 'GET'};

fetch('https://ledger.sandbox.lerian.net/v1/organizations/{organization_id}/ledgers/{ledger_id}/asset-rates/{external_id}', 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://ledger.sandbox.lerian.net/v1/organizations/{organization_id}/ledgers/{ledger_id}/asset-rates/{external_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);

$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://ledger.sandbox.lerian.net/v1/organizations/{organization_id}/ledgers/{ledger_id}/asset-rates/{external_id}"

req, _ := http.NewRequest("GET", url, nil)

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://ledger.sandbox.lerian.net/v1/organizations/{organization_id}/ledgers/{ledger_id}/asset-rates/{external_id}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://ledger.sandbox.lerian.net/v1/organizations/{organization_id}/ledgers/{ledger_id}/asset-rates/{external_id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
{
  "createdAt": "2023-11-07T05:31:56Z",
  "externalId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "from": "<string>",
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "ledgerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "metadata": {},
  "organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "rate": 123,
  "scale": 1,
  "source": "<string>",
  "to": "<string>",
  "ttl": 1,
  "updatedAt": "2023-11-07T05:31:56Z"
}
{
"code": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "about:blank"
}

Cabeçalhos

X-Request-Id
string<uuid>

Um identificador único utilizado para rastrear e acompanhar cada requisição.

Authorization
string

Token JWT bearer para autenticação. Obrigatório quando PLUGIN_AUTH_ENABLED=true (exigido em implantações multi-tenant). Opcional no modo OSS single-tenant padrão. Formato: Bearer <token>

Parâmetros de caminho

organization_id
string<uuid>
obrigatório

O identificador único da Organização associada ao Ledger.

ledger_id
string<uuid>
obrigatório

O identificador único do Ledger associado.

external_id
string
obrigatório

ID externo da Taxa de Ativo

Resposta

OK

createdAt
string<date-time>
obrigatório
Exemplo:

"2021-01-01T00:00:00Z"

externalId
string<uuid>
obrigatório
Exemplo:

"00000000-0000-0000-0000-000000000000"

from
string
obrigatório
Required string length: 2 - 10
Exemplo:

"USD"

id
string<uuid>
obrigatório
Exemplo:

"00000000-0000-0000-0000-000000000000"

ledgerId
string<uuid>
obrigatório
Exemplo:

"00000000-0000-0000-0000-000000000000"

metadata
object
obrigatório
organizationId
string<uuid>
obrigatório
Exemplo:

"00000000-0000-0000-0000-000000000000"

rate
number<double>
obrigatório
Exemplo:

100

scale
number<double> | null
obrigatório
Intervalo obrigatório: x >= 0
Exemplo:

2

source
string | null
obrigatório
Maximum string length: 200
Exemplo:

"External System"

to
string
obrigatório
Required string length: 2 - 10
Exemplo:

"BRL"

ttl
integer<int64>
obrigatório
Intervalo obrigatório: x >= 0
Exemplo:

3600

updatedAt
string<date-time>
obrigatório
Exemplo:

"2021-01-01T00:00:00Z"