Fordefi API (0.2.0)

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

Users

This resource collection represents users.

User types and roles

There are several types of user in the Fordefi platform:
  • Person: A human user of the platform. Only a person can have an admin role.
  • API User: An API client key that is trying to interact with the platform.See Create an API user and token.
  • API Signer: Used to auto-sign transactions. See Automate Signing with API Signer.
  • End user: For Consumer Wallets. It represents the user of a third-party platform.
In addition, for all users (except end users in WaaS solutions) there are three possible user 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 them.

Operations

Authorization Tokens

This resource collection represents authorization tokens.

These tokens allow end users to authenticate with Fordefi. Each end user can have a maximum of ten active authorization tokens at any time. Each token is valid for 24 hours only.

Instructions for creating an API user and token are provided here: Create an API user and token.

Operations

Blockchains

This resource collection represents blockchains.

Operations

Webhooks

This resource collection represents webhooks.

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

Operations

Address Book

This resource collection represents an address book.

Address Book is an object that represents a contact (saved blockchain address and its alias) in the platform. The Address Book object can either be queried directly or returned as part of a transaction.

Operations

Transactions

This resource collection represents a transaction.

A transaction is any object that can be signed cryptographically (with a private key).

In general, it can be one of the following types:

  • EVM Transaction: A native currency transfer or a smart contract call on an EVM-based chain.
  • EVM Message: In which a message is signed for off-chain use on an EVM-based chain.
  • Solana Transaction: A list of instructions to invoke on a Solana-based chain.
  • Cosmos Transaction: A transaction in the Cosmos ecosystem on Cosmos Hub or one of the supported app chains.
  • Black Box Signature: In which a payload is signed for use, external to the Fordefi platform.
  • Cosmos Message
  • Solana Message
For more information, see Transaction Types.

Monitor transactions

As transactions progress from creation through completion, they can follow several workflows, during which they take on various statuses. Status is returned in the state field of the Get Transaction and List Transaction requests.

For a list of possible statuses, see Transaction Lifecycle.

Operations

Batch Transactions

This resource collection represents a batch transaction.

Operations

Vaults

This resource collection represents a vault.

The vault is the basic unit to manage funds. A vault has a single public address but is multi-chain, meaning you can use it across all chains that are compatible with the address and are supported by Fordefi.

Operations

Vault Groups

This resource collection represents a vault group.

Operations

Assets

This resource collection represents assets.

  • 'Assets', in general, refer to the assets that are supported by Fordefi and can be held by an organization. The Fetch Asset Prices API, for example, returns the current prices of all the assets that are recognized by the system.
  • 'Owned assets' reflects the balance of specific assets that are owned by an organization.

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
assetAsset (object) or Asset (object) or Asset (object) or Asset (object) or Asset (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
assetAssetIdentifierRequest (object) or AssetIdentifierRequest (object) or AssetIdentifierRequest (object) or AssetIdentifierRequest (object) or AssetIdentifierRequest (object) or AssetIdentifierRequest (object) or AssetIdentifierRequest (object) or AssetIdentifierRequest (object) or AssetIdentifierRequest (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_identifierAssetIdentifierRequest (object) or AssetIdentifierRequest (object) or AssetIdentifierRequest (object) or AssetIdentifierRequest (object) or AssetIdentifierRequest (object) or AssetIdentifierRequest (object) or AssetIdentifierRequest (object) or AssetIdentifierRequest (object) or AssetIdentifierRequest (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_identifierAssetIdentifier (object) or AssetIdentifier (object) or AssetIdentifier (object) or AssetIdentifier (object) or AssetIdentifier (object) or AssetIdentifier (object) or AssetIdentifier (object) or AssetIdentifier (object) or AssetIdentifier (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.

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" }

End Users

This resource collection represents end users.

End users are the users of a third-party app that embeds cryptographic technology provided by Fordefi. Each end user's mobile device can have a unique key-share, where Fordefi holds the matching key-share.

Operations

User Groups

This resource collection represents user groups.

Operations

Exports

This resource collection represents asynchronous export states.

Operations

Organizations

Operations