Create Ticket
Creates a new Smart Transfer ticket. Learn more about Fireblocks Smart Transfers here.
Note: The DVP value is in Early Access and should only be used if Fireblocks has enabled it in your workspace. Contact your Customer Success Manager for more information.
Endpoint Permissions: Admin, Non-Signing Admin, Signer, Approver, Editor.
POST
/
smart-transfers
TypeScript
const response: Promise<FireblocksResponse<SmartTransferTicketResponse>> = fireblocks.smartTransfer.createTicket(smartTransferApiCreateTicketRequest);CompletableFuture<ApiResponse<SmartTransferTicketResponse>> response = fireblocks.smartTransfer().createTicket(smartTransferCreateTicket, idempotencyKey);response = fireblocks.smart_transfer.create_ticket(smart_transfer_create_ticket, idempotency_key);curl --request POST \
--url https://api.fireblocks.io/v1/smart-transfers \
--header 'Content-Type: application/json' \
--data '
{
"createdByNetworkId": "<string>",
"expiresIn": 24.5,
"terms": [
{
"asset": "BTC",
"amount": "133.789161216184",
"fromNetworkId": "947c6115-1f5f-4fb4-9fd6-a1f9dee14670",
"toNetworkId": "5d009697-c29b-48e0-aff8-1f4305d19dc2"
}
],
"externalRefId": "<string>",
"note": "<string>",
"submit": true
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
createdByNetworkId: '<string>',
expiresIn: 24.5,
terms: [
{
asset: 'BTC',
amount: '133.789161216184',
fromNetworkId: '947c6115-1f5f-4fb4-9fd6-a1f9dee14670',
toNetworkId: '5d009697-c29b-48e0-aff8-1f4305d19dc2'
}
],
externalRefId: '<string>',
note: '<string>',
submit: true
})
};
fetch('https://api.fireblocks.io/v1/smart-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://api.fireblocks.io/v1/smart-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([
'createdByNetworkId' => '<string>',
'expiresIn' => 24.5,
'terms' => [
[
'asset' => 'BTC',
'amount' => '133.789161216184',
'fromNetworkId' => '947c6115-1f5f-4fb4-9fd6-a1f9dee14670',
'toNetworkId' => '5d009697-c29b-48e0-aff8-1f4305d19dc2'
]
],
'externalRefId' => '<string>',
'note' => '<string>',
'submit' => true
]),
CURLOPT_HTTPHEADER => [
"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.fireblocks.io/v1/smart-transfers"
payload := strings.NewReader("{\n \"createdByNetworkId\": \"<string>\",\n \"expiresIn\": 24.5,\n \"terms\": [\n {\n \"asset\": \"BTC\",\n \"amount\": \"133.789161216184\",\n \"fromNetworkId\": \"947c6115-1f5f-4fb4-9fd6-a1f9dee14670\",\n \"toNetworkId\": \"5d009697-c29b-48e0-aff8-1f4305d19dc2\"\n }\n ],\n \"externalRefId\": \"<string>\",\n \"note\": \"<string>\",\n \"submit\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
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))
}require 'uri'
require 'net/http'
url = URI("https://api.fireblocks.io/v1/smart-transfers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"createdByNetworkId\": \"<string>\",\n \"expiresIn\": 24.5,\n \"terms\": [\n {\n \"asset\": \"BTC\",\n \"amount\": \"133.789161216184\",\n \"fromNetworkId\": \"947c6115-1f5f-4fb4-9fd6-a1f9dee14670\",\n \"toNetworkId\": \"5d009697-c29b-48e0-aff8-1f4305d19dc2\"\n }\n ],\n \"externalRefId\": \"<string>\",\n \"note\": \"<string>\",\n \"submit\": true\n}"
response = http.request(request)
puts response.read_body{
"message": "Success",
"data": {
"id": "118320d2-761f-46c7-96cf-65e71a370b36",
"type": "ASYNC",
"status": "DRAFT",
"createdByNetworkId": "3eaa94c5-128b-4835-bb08-3111bb6564c7",
"createdByNetworkIdName": "Network id name",
"createdAt": "2023-03-01T11:23:00Z",
"updatedAt": "2023-03-01T11:23:00Z",
"direction": "EXCHANGE",
"dvpExecutionStatus": "STARTED",
"orderCreatedByNetworkId": "3eaa94c5-128b-4835-bb08-3111bb6564c7",
"terms": [
{
"id": "84601ee2-b10f-4aa8-be9c-dba259a3533a",
"ticketId": "118320d2-761f-46c7-96cf-65e71a370b36",
"amount": "10.00",
"asset": "ETH",
"fromNetworkId": "947c6115-1f5f-4fb4-9fd6-a1f9dee14670",
"toNetworkId": "5d009697-c29b-48e0-aff8-1f4305d19dc2",
"status": "CREATED"
},
{
"id": "84601ee2-b10f-4aa8-be9c-dba259a3533a",
"ticketId": "118320d2-761f-46c7-96cf-65e71a370b36",
"amount": "10.00",
"asset": "ETH",
"fromNetworkId": "947c6115-1f5f-4fb4-9fd6-a1f9dee14670",
"fromNetworkIdName": "Source network profile 1",
"toNetworkId": "5d009697-c29b-48e0-aff8-1f4305d19dc2",
"toNetworkIdName": "Destination network profile 1",
"status": "FUNDING",
"connectionId": "14817440-d5c8-4dbd-a754-ad415683610c",
"fbTxId": "79075e8c-1fd9-4c97-9575-3bd9229e5c0d",
"createdAt": "2023-03-01T11:23:00.000Z",
"updatedAt": "2023-03-01T11:23:00.000Z"
},
{
"id": "84601ee2-b10f-4aa8-be9c-dba259a3533a",
"ticketId": "118320d2-761f-46c7-96cf-65e71a370b36",
"amount": "10.00",
"asset": "ETH",
"fromNetworkId": "947c6115-1f5f-4fb4-9fd6-a1f9dee14670",
"fromNetworkIdName": "Source network profile 2",
"toNetworkId": "5d009697-c29b-48e0-aff8-1f4305d19dc2",
"toNetworkIdName": "Destination network profile 2",
"status": "FUNDED",
"connectionId": "14817440-d5c8-4dbd-a754-ad415683610c",
"fbTxId": "79075e8c-1fd9-4c97-9575-3bd9229e5c0d",
"txHash": "0xb5c8bd9430b6cc87a0e2fe110ece6bf527fa4f170a4bc8cd032f768fc5219838",
"createdAt": "2023-03-01T11:23:00.000Z",
"updatedAt": "2023-03-01T11:23:00.000Z"
}
],
"expiresIn": "13",
"expiresAt": "2023-03-01T11:23:00Z",
"submittedAt": "2023-03-01T11:23:00Z",
"expiredAt": "2023-03-01T11:23:00Z",
"canceledAt": "2023-03-01T11:23:00Z",
"fulfilledAt": "2023-03-01T11:23:00Z",
"externalRefId": "2631ffb9d8fe47c6b0825b5be28297da",
"note": "Random note",
"canceledByNetworkIdName": "Network id name",
"canceledByMe": true,
"createdByMe": true
}
}{
"message": "You do not have permission to execute this action",
"code": 3002
}{
"message": "Your request contains invalid data",
"code": "2e7a7a5d-c85c-4ea5-9adf-668cba8b4eb4"
}Headers
A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours.
Body
application/json
Available options:
ASYNC, DVP Number of hours after which an OPEN ticket will expire if no term is funded.
Required range:
1 <= x <= 48Show child attributes
Show child attributes
Maximum string length:
64Maximum string length:
1024Was this page helpful?
Previous
Search Ticket by IDFind Smart Transfer ticket by id. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer.
Next
⌘I
TypeScript
const response: Promise<FireblocksResponse<SmartTransferTicketResponse>> = fireblocks.smartTransfer.createTicket(smartTransferApiCreateTicketRequest);CompletableFuture<ApiResponse<SmartTransferTicketResponse>> response = fireblocks.smartTransfer().createTicket(smartTransferCreateTicket, idempotencyKey);response = fireblocks.smart_transfer.create_ticket(smart_transfer_create_ticket, idempotency_key);curl --request POST \
--url https://api.fireblocks.io/v1/smart-transfers \
--header 'Content-Type: application/json' \
--data '
{
"createdByNetworkId": "<string>",
"expiresIn": 24.5,
"terms": [
{
"asset": "BTC",
"amount": "133.789161216184",
"fromNetworkId": "947c6115-1f5f-4fb4-9fd6-a1f9dee14670",
"toNetworkId": "5d009697-c29b-48e0-aff8-1f4305d19dc2"
}
],
"externalRefId": "<string>",
"note": "<string>",
"submit": true
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
createdByNetworkId: '<string>',
expiresIn: 24.5,
terms: [
{
asset: 'BTC',
amount: '133.789161216184',
fromNetworkId: '947c6115-1f5f-4fb4-9fd6-a1f9dee14670',
toNetworkId: '5d009697-c29b-48e0-aff8-1f4305d19dc2'
}
],
externalRefId: '<string>',
note: '<string>',
submit: true
})
};
fetch('https://api.fireblocks.io/v1/smart-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://api.fireblocks.io/v1/smart-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([
'createdByNetworkId' => '<string>',
'expiresIn' => 24.5,
'terms' => [
[
'asset' => 'BTC',
'amount' => '133.789161216184',
'fromNetworkId' => '947c6115-1f5f-4fb4-9fd6-a1f9dee14670',
'toNetworkId' => '5d009697-c29b-48e0-aff8-1f4305d19dc2'
]
],
'externalRefId' => '<string>',
'note' => '<string>',
'submit' => true
]),
CURLOPT_HTTPHEADER => [
"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.fireblocks.io/v1/smart-transfers"
payload := strings.NewReader("{\n \"createdByNetworkId\": \"<string>\",\n \"expiresIn\": 24.5,\n \"terms\": [\n {\n \"asset\": \"BTC\",\n \"amount\": \"133.789161216184\",\n \"fromNetworkId\": \"947c6115-1f5f-4fb4-9fd6-a1f9dee14670\",\n \"toNetworkId\": \"5d009697-c29b-48e0-aff8-1f4305d19dc2\"\n }\n ],\n \"externalRefId\": \"<string>\",\n \"note\": \"<string>\",\n \"submit\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
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))
}require 'uri'
require 'net/http'
url = URI("https://api.fireblocks.io/v1/smart-transfers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"createdByNetworkId\": \"<string>\",\n \"expiresIn\": 24.5,\n \"terms\": [\n {\n \"asset\": \"BTC\",\n \"amount\": \"133.789161216184\",\n \"fromNetworkId\": \"947c6115-1f5f-4fb4-9fd6-a1f9dee14670\",\n \"toNetworkId\": \"5d009697-c29b-48e0-aff8-1f4305d19dc2\"\n }\n ],\n \"externalRefId\": \"<string>\",\n \"note\": \"<string>\",\n \"submit\": true\n}"
response = http.request(request)
puts response.read_body{
"message": "Success",
"data": {
"id": "118320d2-761f-46c7-96cf-65e71a370b36",
"type": "ASYNC",
"status": "DRAFT",
"createdByNetworkId": "3eaa94c5-128b-4835-bb08-3111bb6564c7",
"createdByNetworkIdName": "Network id name",
"createdAt": "2023-03-01T11:23:00Z",
"updatedAt": "2023-03-01T11:23:00Z",
"direction": "EXCHANGE",
"dvpExecutionStatus": "STARTED",
"orderCreatedByNetworkId": "3eaa94c5-128b-4835-bb08-3111bb6564c7",
"terms": [
{
"id": "84601ee2-b10f-4aa8-be9c-dba259a3533a",
"ticketId": "118320d2-761f-46c7-96cf-65e71a370b36",
"amount": "10.00",
"asset": "ETH",
"fromNetworkId": "947c6115-1f5f-4fb4-9fd6-a1f9dee14670",
"toNetworkId": "5d009697-c29b-48e0-aff8-1f4305d19dc2",
"status": "CREATED"
},
{
"id": "84601ee2-b10f-4aa8-be9c-dba259a3533a",
"ticketId": "118320d2-761f-46c7-96cf-65e71a370b36",
"amount": "10.00",
"asset": "ETH",
"fromNetworkId": "947c6115-1f5f-4fb4-9fd6-a1f9dee14670",
"fromNetworkIdName": "Source network profile 1",
"toNetworkId": "5d009697-c29b-48e0-aff8-1f4305d19dc2",
"toNetworkIdName": "Destination network profile 1",
"status": "FUNDING",
"connectionId": "14817440-d5c8-4dbd-a754-ad415683610c",
"fbTxId": "79075e8c-1fd9-4c97-9575-3bd9229e5c0d",
"createdAt": "2023-03-01T11:23:00.000Z",
"updatedAt": "2023-03-01T11:23:00.000Z"
},
{
"id": "84601ee2-b10f-4aa8-be9c-dba259a3533a",
"ticketId": "118320d2-761f-46c7-96cf-65e71a370b36",
"amount": "10.00",
"asset": "ETH",
"fromNetworkId": "947c6115-1f5f-4fb4-9fd6-a1f9dee14670",
"fromNetworkIdName": "Source network profile 2",
"toNetworkId": "5d009697-c29b-48e0-aff8-1f4305d19dc2",
"toNetworkIdName": "Destination network profile 2",
"status": "FUNDED",
"connectionId": "14817440-d5c8-4dbd-a754-ad415683610c",
"fbTxId": "79075e8c-1fd9-4c97-9575-3bd9229e5c0d",
"txHash": "0xb5c8bd9430b6cc87a0e2fe110ece6bf527fa4f170a4bc8cd032f768fc5219838",
"createdAt": "2023-03-01T11:23:00.000Z",
"updatedAt": "2023-03-01T11:23:00.000Z"
}
],
"expiresIn": "13",
"expiresAt": "2023-03-01T11:23:00Z",
"submittedAt": "2023-03-01T11:23:00Z",
"expiredAt": "2023-03-01T11:23:00Z",
"canceledAt": "2023-03-01T11:23:00Z",
"fulfilledAt": "2023-03-01T11:23:00Z",
"externalRefId": "2631ffb9d8fe47c6b0825b5be28297da",
"note": "Random note",
"canceledByNetworkIdName": "Network id name",
"canceledByMe": true,
"createdByMe": true
}
}{
"message": "You do not have permission to execute this action",
"code": 3002
}{
"message": "Your request contains invalid data",
"code": "2e7a7a5d-c85c-4ea5-9adf-668cba8b4eb4"
}