Fordefi API (0.2.0)

Download OpenAPI description
Languages
Servers
Production
https://api.fordefi.com/

Users

These endpoints allow you to get information about users in your Fordefi organization.

There are several types of users in the Fordefi platform:

Users can have one of three possible roles, which define the permissions that the user is given:

  • Admin: A user with high privileges in the organization. Only admins have permission to manage the policy, set up the backup, manage the address book, and add or remove users in the organization. Only a person can have an admin role.
  • Trader: A user who can create vaults and transactions.
  • Viewer: A user who has full view of the organization's users, addresses, and policies, as well as of the vaults and transactions, but does not have permissions to create or modify them.

The Users API is currently read-only. To add/remove users, visit the Fordefi web console.

Operations

Authorization Tokens

These endpoints allow you to manage end-user authorization tokens used for Fordefi's WaaS solution.

Authorization tokens allow end users to authenticate with Fordefi. Each end user can have a maximum of ten active authorization tokens at any time.

More information on authenticating end users is provided in the WaaS developer guide.

Operations

Blockchains

These endpoints allow you to get information about blockchains supported by Fordefi.

Operations

Webhooks

These endpoints allow you to manually trigger your pre-configured webhooks.

Use Webhooks describes how to configure webhooks, validate them, and resend them.

Operations

Address Book

These endpoints allow you to list the contacts in your address book.

To add/remove contacts, visit the Fordefi web console. See the user guide for more info.

Operations

Transactions

These endpoints allow you to manage transactions on the Fordefi platform.

A transaction represents an operation that can be one of the following:

  • An on-chain action that modifies blockchain state
  • An off-chain cryptographically signed message or data
Consult the developer guide for more information on creating, monitoring, and simulating tranasctions.
Operations

Batch Transactions

These endpoints allow you to manage batch transactions on the Fordefi platform.

Batch transactions are currently supported only on Solana, for the purpose of supporting the signAllTransactions flow used by certain Solana DApps. Batch transactions undergo policy evaluation as a whole: the policy is applied to a “virtual transaction” whose list of instructions is the union of the instructions of the individual transactions in the batch, and whose balance changes are the aggregation of balance changes of the individual transactions.

Operations

Vaults

These endpoints allow you to manage vaults.

A vault is the basic unit to manage funds. Each vault supports a single "chain family", such as EVM, Bitcoin, Solana, Cosmos, etc., determined by the vault's type. A vault supports all the chains within the chain family (e.g., an EVM vault supports all EVM chains).

Operations

Vault Groups

These endpoints allow you to view your vault groups.

Vault Groups are used to collectively manage policies and view permissions for a group of vaults.

The API is read-only. To manage vault groups, visit the Fordefi web console. See more info in the user guide.

Operations

Assets

These endpoints allow you to get information about the assets in your organization, including metadata, balances, and prices.

Fordefi supports native assets and fungible tokens on each of the supported blockchains, and on many chains also non-fungible tokens.

Assets are chain-specific, meaning that USDC on Ethereum is different from USDC on Polygon.

Operations

Get Owned Asset

Request

Get a a specific asset owned by an organization.

Path
idstring(uuid)required

ID of the asset to retrieve.

curl -i -X GET \
  'https://api.fordefi.com/api/v1/assets/owned-assets/{id}' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Successful Response

Bodyapplication/json
assetCosmosAsset (object) or EvmAsset (object) or SolanaAsset (object) or SuiAsset (object) or UtxoAsset (object)
One of:
Deprecated
priced_assetobjectrequired
balancestring^\d+$required
Example: "1000000000000000000"
balancesobjectrequired

The cryptocurrency balances of the asset.

Response
application/json
{ "asset": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "decimals": 0, "price": {}, "name": "string", "symbol": "string", "hidden": true, "verified": true, "asset_identifier": {}, "metadata_uri": "string", "type": "cosmos_asset", "details": {} }, "priced_asset": { "type": "asset_price", "asset_identifier": {}, "asset_info": {}, "price": {} }, "balance": "1000000000000000000", "balances": { "mined": "1000000000000000000", "pending_incoming": "1000000000000000000" } }

List Owned Assets

Request

Get a list of all assets owned by an organization.

Query
chainsArray of strings
asset_idsArray of strings(uuid)
is_hiddenboolean
searchstring
vault_idsArray of strings(uuid)
end_user_idsArray of strings(uuid)
sort_byArray of strings
Items Enum"asset_name_asc""asset_name_desc""chain_identifier_asc""chain_identifier_desc""balance_asc""balance_desc""market_value_asc""market_value_desc""price_asc""price_desc"
pageinteger>= 1

The page number to fetch.

Default 1
sizeinteger[ 0 .. 100 ]

The number of items per page.

Default 50
curl -i -X GET \
  'https://api.fordefi.com/api/v1/assets/owned-assets?asset_ids=497f6eca-6276-4993-bfeb-53cbbbba6f08&chains=string&end_user_ids=497f6eca-6276-4993-bfeb-53cbbbba6f08&is_hidden=true&page=1&search=string&size=50&sort_by=asset_name_asc&vault_ids=497f6eca-6276-4993-bfeb-53cbbbba6f08' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Successful Response

Bodyapplication/json
totalintegerrequired
pageintegerrequired
sizeintegerrequired
owned_assetsArray of objectsrequired
Response
application/json
{ "total": 0, "page": 0, "size": 0, "owned_assets": [ {} ] }

Update Asset Configuration

Request

Update the asset's configuration under the entire organization.

Bodyapplication/jsonrequired
assetAptosAssetIdentifierRequest (object) or CosmosAssetIdentifierRequest (object) or EvmAssetIdentifierRequest (object) or SolanaAssetIdentifierRequest (object) or StarknetAssetIdentifierRequest (object) or SuiAssetIdentifierRequest (object) or TonAssetIdentifierRequest (object) or UtxoAssetIdentifierRequest (object)required
One of:

The address of the ERC-20 asset to update.

hiddenbooleanrequired

True to hide the token when listing assets, False otherwise.

curl -i -X PUT \
  https://api.fordefi.com/api/v1/assets \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "asset": {
      "type": "aptos",
      "details": {
        "type": "native",
        "chain": "aptos_mainnet"
      }
    },
    "hidden": true
  }'

Responses

Successful Response

Response
No content

Fetch Asset Prices

Request

Fetch the prices of assets.

Bodyapplication/jsonrequired
asset_identifiersArray of anynon-emptyrequired

The assets to price.

curl -i -X POST \
  https://api.fordefi.com/api/v1/assets/prices \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "asset_identifiers": [
      {
        "type": "aptos",
        "details": {
          "type": "native",
          "chain": "aptos_mainnet"
        }
      }
    ]
  }'

Responses

Successful Response

Bodyapplication/json
priced_assetsArray of anyrequired

The priced assets.

Response
application/json
{ "priced_assets": [ {} ] }

Create Asset Info

Request

Create asset infos in the Fordefi platform.

Bodyapplication/jsonrequired
asset_identifierAptosAssetIdentifierRequest (object) or CosmosAssetIdentifierRequest (object) or EvmAssetIdentifierRequest (object) or SolanaAssetIdentifierRequest (object) or StarknetAssetIdentifierRequest (object) or SuiAssetIdentifierRequest (object) or TonAssetIdentifierRequest (object) or UtxoAssetIdentifierRequest (object)required
One of:

The asset identifier to enrich.

curl -i -X POST \
  https://api.fordefi.com/api/v1/assets/asset-infos \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "asset_identifier": {
      "type": "aptos",
      "details": {
        "type": "native",
        "chain": "aptos_mainnet"
      }
    }
  }'

Responses

Successful Response

Bodyapplication/json
idstring(uuid)required

The asset ID.

asset_identifierAptosAssetIdentifier (object) or CosmosAssetIdentifier (object) or EvmAssetIdentifier (object) or SolanaAssetIdentifier (object) or StarknetAssetIdentifier (object) or SuiAssetIdentifier (object) or TonAssetIdentifier (object) or UtxoAssetIdentifier (object)required
One of:

The asset identifier.

namestringrequired

The name of the asset.

symbolstringrequired

The symbol (ticker) of the asset.

decimalsinteger>= 0required
verifiedbooleanrequired

True if this asset is verified by Fordefi, False otherwise.

metadata_uristring

The URI of the asset metadata.

is_spambooleanrequired

True if this asset is spam, False otherwise.

logo_urlstring(uri)non-empty

The URL of the asset logo.

explorer_urlstring(uri)[ 1 .. 2083 ] characters

The URL of a blockchain explorer that provides real-time information about the asset.

Response
application/json
{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "asset_identifier": { "type": "aptos", "details": {}, "chain": {} }, "name": "string", "symbol": "string", "decimals": 0, "verified": true, "metadata_uri": "string", "is_spam": true, "logo_url": "http://example.com", "explorer_url": "http://example.com" }

End Users

These endpoints allow you to manage WaaS end-users.

End users correspond to users of the platform who has integrated the Fordefi WaaS solution. For example, in the case of a retail platform, these would be the retail consumers of the platform.

Operations

User Groups

These endpoints allow you to view your user groups.

User Groups are used to collectively manage policies and view permissions for a group of users.

The API is read-only. To manage user groups, visit the Fordefi web console. See more info in the user guide.

Operations

Exports

These endpoints allow you to manage asynchronous actions such as data exports.

Operations

Organizations

Operations