Pular para o conteúdo principal
POST
/
v1
/
str
/
operations
/
liquidity-transfers
Criar transferência de liquidez da Conta-PI
curl --request POST \
  --url https://spb.sandbox.lerian.net/v1/str/operations/liquidity-transfers \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "amount": "<string>",
  "direction": "<string>",
  "accountType": "<string>",
  "contaPiISPB": "<string>"
}
'
import requests

url = "https://spb.sandbox.lerian.net/v1/str/operations/liquidity-transfers"

payload = {
"amount": "<string>",
"direction": "<string>",
"accountType": "<string>",
"contaPiISPB": "<string>"
}
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({
amount: '<string>',
direction: '<string>',
accountType: '<string>',
contaPiISPB: '<string>'
})
};

fetch('https://spb.sandbox.lerian.net/v1/str/operations/liquidity-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://spb.sandbox.lerian.net/v1/str/operations/liquidity-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([
'amount' => '<string>',
'direction' => '<string>',
'accountType' => '<string>',
'contaPiISPB' => '<string>'
]),
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://spb.sandbox.lerian.net/v1/str/operations/liquidity-transfers"

payload := strings.NewReader("{\n \"amount\": \"<string>\",\n \"direction\": \"<string>\",\n \"accountType\": \"<string>\",\n \"contaPiISPB\": \"<string>\"\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://spb.sandbox.lerian.net/v1/str/operations/liquidity-transfers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": \"<string>\",\n \"direction\": \"<string>\",\n \"accountType\": \"<string>\",\n \"contaPiISPB\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://spb.sandbox.lerian.net/v1/str/operations/liquidity-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 \"amount\": \"<string>\",\n \"direction\": \"<string>\",\n \"accountType\": \"<string>\",\n \"contaPiISPB\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "operationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "status": "<string>",
  "wireCode": "<string>"
}
{
"code": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "about:blank"
}

Autorizações

Authorization
string
header
obrigatório

JWT bearer token issued by the identity provider.

Cabeçalhos

Authorization
string

Bearer JWT token.

X-Idempotency
string

Idempotency key (canonical; legacy alias X-Idempotency-Key).

X-Idempotency-Key
string

Idempotency key (legacy alias).

X-TTL
string

Idempotency key TTL in seconds.

Corpo

application/json
amount
string
obrigatório

Movement amount as a decimal-reais string, forwarded verbatim into the LPI submit — Lerian SPB performs NO arithmetic on it.

Pattern: ^[0-9]+(\.[0-9]+)?$
Exemplo:

"1500.25"

direction
string
obrigatório

Operator-facing movement direction: aporte funds the FI's Conta PI; resgate recalls funds from Conta PI.

Exemplo:

"aporte"

accountType
string

Counterparty account type. RB_CL = Reservas Bancárias / Conta de Liquidação ((aporte,RB_CL)->LPI0001, (resgate,RB_CL)->LPI0003); CCME = Conta Correspondente a Moeda Eletrônica, own-account only ((aporte,CCME)->LPI0002, (resgate,CCME)->LPI0004). Empty defaults to RB_CL.

Exemplo:

"RB_CL"

contaPiISPB
string

Optional Conta-PI owner ISPB (8 digits). Empty means the FI's OWN Conta PI (own-account path); a value differing from the issuer ISPB is the liquidante-funded path (RB_CL only). For CCME it must be empty or equal the issuer ISPB — CCME is own-account only.

Pattern: ^[0-9]{8}$
Exemplo:

38166

Resposta

Accepted

operationId
string<uuid>
obrigatório

Server-assigned operation UUID to poll on GET /v1/str/operations/liquidity-transfers/{operationId}.

Exemplo:

"7c8b3a2e-9f1d-4a55-9b8e-1e1234567890"

status
string
obrigatório

Projection lifecycle status; PENDING on accept (awaiting the STR R-leg settlement confirmation).

Exemplo:

"PENDING"

wireCode
string
obrigatório

LPI wire code derived server-side from (direction, accountType): (aporte,RB_CL)=LPI0001, (aporte,CCME)=LPI0002, (resgate,RB_CL)=LPI0003, (resgate,CCME)=LPI0004.

Exemplo:

"LPI0001"