Skip to main content

Cardano / Transfer

Transferring ADA requires:

  • The account from which ADA to be transferred, which will sign the transaction.
  • The address to which ADA is transferred.
  • Amount of ADA to be transferred.

Blockfrost Project IDs

important

Blockfrost Project IDs are a secret. Treat them with caution, following the same security best practices as with an API key.

To use Cardano with the Staking API, you must first add a Blockfrost Project ID to your account using the /blockfrost_projects endpoint.

Flow Diagram

Below is a complete diagram for the Cardano Transfer flow:

Cardano Transfer Flow Diagram

Actions


Add Blockfrost Project

Add a Blockfrost project ID to your account.

URL

https://cardano-slate.datahub.figment.io/api/v1/blockfrost_projects

Request

  • project_id* : string Your Blockfrost Project ID. Refer to blockfrost.io for more information and to sign up for a Project ID.
  • chain_code* : string The Cardano chain used by this Blockfrost project, acceptable values are either mainnet or preprod.

Response

  • id : number The related project ID number given to the submitted credentials by the Staking API
  • chain_code : string The chain code applicable to the Blockfrost Project ID
  • project_id : string Your Blockfrost Project ID
  • object : string "blockfrost_project"
  • created : timestamp A timestamp for when the Blockfrost Project ID was registered with the Staking API.

Notes

  • This step must be completed before creating any flows for Cardano.
  • Only one Blockfrost Project ID is required per account.
Request
Example Response
{
"id": 7,
"chain_code": "preprod",
"project_id": "preprodHnZushwfIxbsl0T6Ut1iLYVuatVeuBgj",
"object": "blockfrost_project",
"created": "2023-03-14T23:42:08.574Z"
}


Get Blockfrost Project

Get a list of Blockfrost project IDs associated with your account.

URL

https://cardano-slate.datahub.figment.io/api/v1/blockfrost_projects

Request

  • None

Response

  • object : "list"
  • url : "/api/v1/blockfrost_projects"
  • data : array
    • id : number - The related project ID number given to the submitted credentials by the Staking API.
    • chain_code : string - The chain code applicable to the Blockfrost Project ID.
    • project_id : string Your Blockfrost Project ID.
    • object : "blockfrost_project"
    • created : timestamp A timestamp for when the Blockfrost Project ID was registered with the Staking API.
Request
Example Response
{
"object": "list",
"url": "/api/v1/blockfrost_projects",
"data": [
{
"id": 9,
"chain_code": "preprod",
"project_id": "preprodMnZushwfIxbBl0t6Ut1iLYVuatVeuBqj",
"object": "blockfrost_project",
"created": "2023-03-14T23:54:55.369Z"
}
]
}


Delete Blockfrost Project

Delete a Blockfrost Project ID from your account.

URL

https://cardano-slate.datahub.figment.io/api/v1/blockfrost_projects

Request

  • id* : number The id given to your Blockfrost Project ID by the Staking API when it was added to your account.

Response

  • A Status 204 No Content response indicates a successful deletion.

Notes

  • Use a GET request to confirm the id has been removed from the list after deletion.
Request
Example Response
""


Create New Transfer Flow

To initiate the transfer process, create a new flow with a POST request to /api/v1/flows.

URL

https://cardano-slate.datahub.figment.io/api/v1/flows

Request

  • flow : object
    • network_code* : string Network this flow operates on (ex. cardano).
    • chain_code* : string Chain this flow operates on (ex. preprod).
    • operation* : string The operation to perform (ex. transfer).

Response

  • id : string ID of the flow.
  • operation : string The Staking API operation being performed by this flow.
  • state : string The current state of the flow.
  • actions : array It includes the name & inputs of all next possible actions.
    • create_transfer_tx : Use this action to transfer ADA.
      • from_account_address : The address from which ADA will be transferred.
      • to_account_address : The address to which ADA will be transferred.
      • amount : The amount of ADA to be transferred.
  • data : object Flow & transaction data.
Request
Example Response
{
"id": "55fcfcdd-b1f5-460c-bce9-8b8864461315",
"operation": "transfer",
"state": "initialized",
"actions": [
{
"name": "create_transfer_tx",
"inputs": [
{
"name": "from_account_address",
"display": "From Account Address",
"description": "",
"type": "string",
"validations": [
{
"type": "presence",
"options": {}
}
],
"array": false,
"default_value": null
},
{
"name": "to_account_address",
"display": "To Account Address",
"description": "",
"type": "string",
"validations": [
{
"type": "presence",
"options": {}
}
],
"array": false,
"default_value": null
},
{
"name": "amount",
"display": "Amount",
"description": "",
"type": "decimal",
"validations": [
{
"type": "presence",
"options": {}
},
{
"type": "numericality",
"options": {
"greater_than": 0
}
}
],
"array": false,
"default_value": null
}
]
}
],
"data": {
"from_account_address": null,
"to_account_address": null,
"amount": null,
"transfer_transaction": null
},
"network_code": "cardano",
"chain_code": "preprod",
"created_at": "2023-03-07T19:18:01.189Z",
"updated_at": "2023-03-07T19:18:01.189Z"
}


Submit Transfer Data

After collecting the required inputs, send a PUT request to /api/v1/flows/[:flow_id]/next to proceed to the next step.

URL

https://cardano-slate.datahub.figment.io/api/v1/flows/[:flow_id]/next

Request

  • name* : create_transfer_tx
  • inputs* : object
    • from_account_address* : string The address from which ADA will be transferred.
    • to_account_address* : string The address to which ADA will be transferred.
    • amount* : number The amount of ADA to be transferred.

Response

  • id : string ID of the flow.
  • operation : string The Staking API operation being performed by this flow.
  • state : string The current state of the flow.
  • actions : array It includes the name & inputs of all next possible actions.
  • data : object Flow & transaction data.
Request
Example Response
{
"id": "55fcfcdd-b1f5-460c-bce9-8b8864461315",
"operation": "transfer",
"state": "transfer_tx_signature",
"actions": [
{
"name": "refresh_transfer_tx",
"inputs": [
{
"name": "from_account_address",
"display": "From Account Address",
"description": "",
"type": "string",
"validations": [
{
"type": "presence",
"options": {}
}
],
"array": false,
"default_value": "addr_test1qpspgu485kwfvhvpnk3mpvxr8vzvhnvw0jcsckcnw6rafklrhsw5y2xnks9h9x5k6l7wyjdwumqggtnvrn3dyjtt28rs0ekrpd"
},
{
"name": "to_account_address",
"display": "To Account Address",
"description": "",
"type": "string",
"validations": [
{
"type": "presence",
"options": {}
}
],
"array": false,
"default_value": "addr_test1qzsv3unnn5gwnqzccf4gk9mmnh5nmfcyjcckhzxjfpv59q9xfu7p7cvhrg6eh374ps852jxq7qzgfjwgknn36ggkdwrsc945zx"
},
{
"name": "amount",
"display": "Amount",
"description": "",
"type": "decimal",
"validations": [
{
"type": "presence",
"options": {}
},
{
"type": "numericality",
"options": {
"greater_than": 0
}
}
],
"array": false,
"default_value": "10.0"
}
]
},
{
"name": "sign_transfer_tx",
"inputs": [
{
"name": "transaction_payload",
"display": "Transaction Payload",
"description": "",
"type": "signed_transaction",
"validations": [],
"array": false,
"default_value": null,
"signers": [
"addr_test1qpspgu485kwfvhvpnk3mpvxr8vzvhnvw0jcsckcnw6rafklrhsw5y2xnks9h9x5k6l7wyjdwumqggtnvrn3dyjtt28rs0ekrpd"
],
"transaction_payload": "84a30081825820409f739d3afb030a23e68ac4506dc3ca8bc646474ea4450568e7dad51fd38b3600018282583900a0c8f2739d10e98058c26a8b177b9de93da70496316b88d248594280a64f3c1f61971a359bc7d50c0f4548c0f00484c9c8b4e71d21166b871a0098968082583900601472a7a59c965d819da3b0b0c33b04cbcd8e7cb10c5b137687d4dbe3bc1d4228d3b40b729a96d7fce249aee6c0842e6c1ce2d2496b51c71a05370815021a00029075a0f5f6"
},
{
"name": "signatures",
"display": "Signatures",
"description": "",
"type": "array_of_signatures",
"validations": [],
"array": true,
"default_value": null,
"element_type": "signature_data",
"signers": [
"addr_test1qpspgu485kwfvhvpnk3mpvxr8vzvhnvw0jcsckcnw6rafklrhsw5y2xnks9h9x5k6l7wyjdwumqggtnvrn3dyjtt28rs0ekrpd"
],
"transaction_payload": "84a30081825820409f739d3afb030a23e68ac4506dc3ca8bc646474ea4450568e7dad51fd38b3600018282583900a0c8f2739d10e98058c26a8b177b9de93da70496316b88d248594280a64f3c1f61971a359bc7d50c0f4548c0f00484c9c8b4e71d21166b871a0098968082583900601472a7a59c965d819da3b0b0c33b04cbcd8e7cb10c5b137687d4dbe3bc1d4228d3b40b729a96d7fce249aee6c0842e6c1ce2d2496b51c71a05370815021a00029075a0f5f6",
"signing_payload": "b097030f88413f546c2188e1f2ab9e6407f653a18153a501f1d05b062538be6e",
"inputs": [
{
"name": "account_address",
"display": "Account Address",
"description": "",
"type": "string",
"validations": [
{
"type": "presence",
"options": {}
}
],
"array": false,
"default_value": null
},
{
"name": "signature",
"display": "Signature",
"description": "",
"type": "string",
"validations": [
{
"type": "presence",
"options": {}
}
],
"array": false,
"default_value": null
}
]
}
]
},
{
"name": "confirm_transfer_tx_by_hash",
"inputs": [
{
"name": "hash",
"display": "Hash",
"description": "",
"type": "string",
"validations": [
{
"type": "presence",
"options": {}
}
],
"array": false,
"default_value": null
},
{
"name": "block_number",
"display": "Block Number",
"description": "",
"type": "integer",
"validations": [],
"array": false,
"default_value": null
}
]
}
],
"data": {
"from_account_address": "addr_test1qpspgu485kwfvhvpnk3mpvxr8vzvhnvw0jcsckcnw6rafklrhsw5y2xnks9h9x5k6l7wyjdwumqggtnvrn3dyjtt28rs0ekrpd",
"to_account_address": "addr_test1qzsv3unnn5gwnqzccf4gk9mmnh5nmfcyjcckhzxjfpv59q9xfu7p7cvhrg6eh374ps852jxq7qzgfjwgknn36ggkdwrsc945zx",
"amount": "10.0",
"transfer_transaction": {
"raw": "84a30081825820409f739d3afb030a23e68ac4506dc3ca8bc646474ea4450568e7dad51fd38b3600018282583900a0c8f2739d10e98058c26a8b177b9de93da70496316b88d248594280a64f3c1f61971a359bc7d50c0f4548c0f00484c9c8b4e71d21166b871a0098968082583900601472a7a59c965d819da3b0b0c33b04cbcd8e7cb10c5b137687d4dbe3bc1d4228d3b40b729a96d7fce249aee6c0842e6c1ce2d2496b51c71a05370815021a00029075a0f5f6",
"signing_payload": "b097030f88413f546c2188e1f2ab9e6407f653a18153a501f1d05b062538be6e",
"signed": null,
"hash": null,
"status": null,
"error": null,
"signatures": [
{
"account_address": "addr_test1qpspgu485kwfvhvpnk3mpvxr8vzvhnvw0jcsckcnw6rafklrhsw5y2xnks9h9x5k6l7wyjdwumqggtnvrn3dyjtt28rs0ekrpd",
"signature": ""
}
],
"block_time": null
}
},
"network_code": "cardano",
"chain_code": "preprod",
"created_at": "2023-03-07T20:48:36.827Z",
"updated_at": "2023-03-07T20:50:34.377Z"
}


Submit Signed Transfer Transaction for Broadcast

After signing the transaction, send a PUT request to /api/v1/flows/[:flow_id]/next and the Staking API will broadcast the transaction to the network.

URL

https://cardano-slate.datahub.figment.io/api/v1/flows/[:flow_id]/next

Request

  • name* : sign_transfer_tx
  • inputs* : object
    • transaction_payload* : Signed transaction payload from the previous step's response.
    • signatures : array of object The signatures array can be used instead of sending a transaction payload when the signing keys are kept in a custodial solution, such as Fireblocks. Refer to the guide Signing Transactions with the Fireblocks API for details.

Response

  • id : string ID of the flow.
  • operation : string The Staking API operation being performed by this flow.
  • state : string The current state of the flow.
    • transfer_tx_broadcasting : Transaction has been broadcast and is waiting for confirmation.
    • completed : Transaction has been confirmed and the transfer is complete.
  • actions : array It includes the name & inputs of all next possible actions.
  • data : object Flow & transaction data.
Request
Example Response
{
"id": "55fcfcdd-b1f5-460c-bce9-8b8864461315",
"operation": "transfer",
"state": "transfer_tx_broadcasting",
"actions": [
{
"name": "wait",
"estimated_state_change_at": "2023-03-07T21:36:20.230Z",
"inputs": []
}
],
"data": {
"from_account_address": "addr_test1qq37lp9qu5xnh45glqmhwx585kguz3k8jsqe95grjs6zp23j9mvvj53acfrj5mtsn2f5qp258uyrfvzrrrww409nxf3svhyew8",
"to_account_address": "addr_test1qpr0vyprum2feg2340lmtx0gs3ye0qwnsagwqfhy5pfd5glrhsw5y2xnks9h9x5k6l7wyjdwumqggtnvrn3dyjtt28rsvy9lvz",
"amount": "10.0",
"transfer_transaction": {
"raw": "84a30081825820701e79cd816d453ac93018e9550b63c52b394808cfaf011f5b0c180793e4f7f70101828258390046f61023e6d49ca151abffb599e884499781d38750e026e4a052da23e3bc1d4228d3b40b729a96d7fce249aee6c0842e6c1ce2d2496b51c71a009896808258390023ef84a0e50d3bd688f837771a87a591c146c7940192d103943420aa322ed8c9523dc2472a6d709a934005543f0834b04318dceabcb332631a3a647c16021a00029075a0f5f6",
"signing_payload": "2800f50ddc0a4ddf1a50b93015d47d2201926310c29aa7e1645ea429d7ba61cf",
"signed": "84a30081825820701e79cd816d453ac93018e9550b63c52b394808cfaf011f5b0c180793e4f7f70101828258390046f61023e6d49ca151abffb599e884499781d38750e026e4a052da23e3bc1d4228d3b40b729a96d7fce249aee6c0842e6c1ce2d2496b51c71a009896808258390023ef84a0e50d3bd688f837771a87a591c146c7940192d103943420aa322ed8c9523dc2472a6d709a934005543f0834b04318dceabcb332631a3a647c16021a00029075a10081825820002d9a48169c6d508699b7aaaa360cc38cb1f3b771444451d38cd0f901ac139d5840b37def2a690fbf3f8cd3aadb2d9507d428772e1b2415366761584010bccead1e75369532df49bf265aeac6684fd4decba93eb8f6a87fa98dbdf01bc78b890001f5f6",
"hash": "2800f50ddc0a4ddf1a50b93015d47d2201926310c29aa7e1645ea429d7ba61cf",
"status": null,
"error": null,
"signatures": [
{
"account_address": "addr_test1qq37lp9qu5xnh45glqmhwx585kguz3k8jsqe95grjs6zp23j9mvvj53acfrj5mtsn2f5qp258uyrfvzrrrww409nxf3svhyew8",
"signature": ""
}
],
"block_time": null
}
},
"network_code": "cardano",
"chain_code": "preprod",
"created_at": "2023-03-07T21:34:06.674Z",
"updated_at": "2023-03-07T21:35:19.456Z"
}


Get Transfer Flow Status

To get the current state of the existing flow, send a GET request to /api/v1/flows/[:flow_id] using the flow ID from the previous step.

URL

https://cardano-slate.datahub.figment.io/api/v1/flows/[:flow_id]

Request

  • None

Response

  • id : string ID of the flow.
  • operation : string The Staking API operation being performed by this flow.
  • state : string The current state of the flow.
    • delegate_tx_broadcasting — Transaction has been broadcast and is waiting for confirmation.
    • completed : Transaction has been confirmed and the transfer is complete.
  • actions : array It includes the name & inputs of all next possible actions.
  • data : object Flow & transaction data.
Request
Example Response
{
"id": "6f995c8a-08b7-43ff-9275-0ef8fc94bc26",
"operation": "staking",
"state": "completed",
"actions": [],
"data": {
"delegator_address": "addr_test1qrwsyak374wzmdakesg8wl8r0feucetatxuqz8s2csqzradxfu7p7cvhrg6eh374ps852jxq7qzgfjwgknn36ggkdwrsu6ae9x",
"validator_address": "pool1wn6a6f23ctq06udwhw27ravdpd6zcr7jlut3yez0wzdackz3222",
"registered": null,
"register_transaction": {
"raw": "84a40081825820dac094796df4319dba24ecb71d109a274f7f4b96ada5eb2b5282f47027b0707700018182583900dd0276d1f55c2db7b6cc10777ce37a73cc657d59b8011e0ac40021f5a64f3c1f61971a359bc7d50c0f4548c0f00484c9c8b4e71d21166b871b0000000253db9117021a00028c29048182008200581ca64f3c1f61971a359bc7d50c0f4548c0f00484c9c8b4e71d21166b87a0f5f6",
"signing_payload": "33f750583301f5b298e7a4d9d42cd950be86ecd018f8df37e4fb58640d39e997",
"signed": "84a40081825820dac094796df4319dba24ecb71d109a274f7f4b96ada5eb2b5282f47027b0707700018182583900dd0276d1f55c2db7b6cc10777ce37a73cc657d59b8011e0ac40021f5a64f3c1f61971a359bc7d50c0f4548c0f00484c9c8b4e71d21166b871b0000000253db9117021a00028c29048182008200581ca64f3c1f61971a359bc7d50c0f4548c0f00484c9c8b4e71d21166b87a10081825820e64c0674e648699f8fa225632bfa1402d09dc3aa2e1f2b523702d2faac9d67d558403adfc52b66d1ceaba7372563d0572ea66c41c40973848a66044768ec81d41ddaf36149d38617db8f02f6c5a0c351d10a8b134e512aed2ca75bcb7b155c298807f5f6",
"hash": "33f750583301f5b298e7a4d9d42cd950be86ecd018f8df37e4fb58640d39e997",
"status": "confirmed",
"error": null,
"signatures": [
{
"account_address": "addr_test1qrwsyak374wzmdakesg8wl8r0feucetatxuqz8s2csqzradxfu7p7cvhrg6eh374ps852jxq7qzgfjwgknn36ggkdwrsu6ae9x",
"signature": ""
}
],
"block_time": "2023-02-24T17:09:47.000Z"
},
"delegate_transaction": {
"raw": "84a4008182582033f750583301f5b298e7a4d9d42cd950be86ecd018f8df37e4fb58640d39e99700018182583900dd0276d1f55c2db7b6cc10777ce37a73cc657d59b8011e0ac40021f5a64f3c1f61971a359bc7d50c0f4548c0f00484c9c8b4e71d21166b871b0000000253d8ee6a021a0002a2ad048183028200581ca64f3c1f61971a359bc7d50c0f4548c0f00484c9c8b4e71d21166b87581c74f5dd2551c2c0fd71aebb95e1f58d0b742c0fd2ff1712644f709bdca0f5f6",
"signing_payload": "689c8172693b66d5a649d1bb8e7df8b5a83c828022910602c1e7815b88c1597a",
"signed": "84a4008182582033f750583301f5b298e7a4d9d42cd950be86ecd018f8df37e4fb58640d39e99700018182583900dd0276d1f55c2db7b6cc10777ce37a73cc657d59b8011e0ac40021f5a64f3c1f61971a359bc7d50c0f4548c0f00484c9c8b4e71d21166b871b0000000253d8ee6a021a0002a2ad048183028200581ca64f3c1f61971a359bc7d50c0f4548c0f00484c9c8b4e71d21166b87581c74f5dd2551c2c0fd71aebb95e1f58d0b742c0fd2ff1712644f709bdca10082825820e64c0674e648699f8fa225632bfa1402d09dc3aa2e1f2b523702d2faac9d67d558401b5c035fa577f743dcc5f0b500d9a3c621aa17297d7a5824671be13c35f764c5e70ccd5d1cb26cb942d5f967214f0f8e1a5853b1c18e7fc6ac90b714a579ab0a8258208e1bdf6b1776a3cac2686e14130029b4544b9f004faa67992b107001b67dd993584027152598680a9e251bec230aca563f34aaf6e8403b630a395b2b62d35b873bc7121d4c026e3cff32c44194202003c3fc350753548645946baf61e65cbbd31003f5f6",
"hash": "689c8172693b66d5a649d1bb8e7df8b5a83c828022910602c1e7815b88c1597a",
"status": "confirmed",
"error": null,
"signatures": [
{
"account_address": "addr_test1qrwsyak374wzmdakesg8wl8r0feucetatxuqz8s2csqzradxfu7p7cvhrg6eh374ps852jxq7qzgfjwgknn36ggkdwrsu6ae9x",
"signature": ""
}
],
"block_time": "2023-02-24T17:13:01.000Z"
}
},
"network_code": "cardano",
"chain_code": "preprod",
"created_at": "2023-02-24T17:06:06.083Z",
"updated_at": "2023-02-24T17:13:21.307Z"
}