Docs

Quick start

Quickstart

This guide walks through a withdrawal for a new customer. You create the customer’s account, record their sending wallet and link it to the account. Next you create a beneficiary account and record the self-hosted wallet the funds go to. Finally, you create the Travel Rule transfer.

The five API calls in this guide, in order.

The five API calls in this guide, in order.

Every request below is a complete curl command. Copy it, replace YOUR_API_KEY with your own key, and run it.

Introduction

Ospree has two environments, each with its own Dashboard and its own API Keys:

  • Sandbox (https://sandbox.ospree.io): for testing and development.

  • Production (https://api.ospree.io): for live transfers.

This guide uses the sandbox. A Manager creates the API Key in the sandbox Dashboard. The key is shown once, at creation, so copy it then. For this guide, give the key Full access, or at least Read & write on the Directory, Address and Travel Rule APIs. See Authentication for Scopes, expiry and IP allowlists.

Send the key in the Authorization header of every request:

Shell · Sample data

Authorization: Bearer YOUR_API_KEY

Step 1: Create a customer account

An account in Ospree represents a legal entity or an individual. Wallet addresses and Travel Rule transfers are linked to accounts.

Create the account with POST /api/v2/directory/accounts. Storing the customer’s details once keeps the data for later Travel Rule transfers complete and consistent.

reference_id is your own ID for the account. It must be unique, 4 to 50 characters, and use only letters, numbers, _ and -. You use it again in later steps. If you run this guide more than once, choose new reference IDs.

Sample Request

Shell · Sample data

curl -X POST 'https://sandbox.ospree.io/api/v2/directory/accounts' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data-raw '{
"reference_id": "digital-capital",
"account_type": "entity",
"account_category": "customer",
"email": "ops@digitalcapital.example",
"entity": {
"registration_country": "US",
"entity_name": {
"name_type": "LEGL",
"name_legal": "Digital Capital",
"name_business": "Digital Capital Pte. Ltd."
}
},
"address": {
"address_type": "BIZZ",
"address_street_no": "456",
"address_street_name": "Elm Street",
"address_building_name": "Elmwood Tower",
"address_floor": "15",
"address_room": "1503",
"address_city": "New York",
"address_region": "New York",
"address_postcode": "10001",
"address_country_code": "US"
}
}'

200

JSON · Sample data

{
"status": "success",
"data": {
"reference_id": "digital-capital",
"account_type": "entity",
"account_category": "customer",
"email": "ops@digitalcapital.example",
"customer_id": null,
"individual": null,
"entity": {
"entity_name": {
"name_type": "LEGL",
"name_legal": "Digital Capital",
"name_business": "Digital Capital Pte. Ltd."
},
"entity_localname": null,
"registration_country": "US"
},
"address": {
"address_type": "BIZZ",
"address_line": null,
"address_street_no": "456",
"address_street_name": "Elm Street",
"address_building_name": "Elmwood Tower",
"address_floor": "15",
"address_room": "1503",
"address_department": null,
"address_subdepartment": null,
"address_postbox": null,
"address_city_location": null,
"address_city": "New York",
"address_region": "New York",
"address_district": null,
"address_postcode": "10001",
"address_country_code": "US"
},
"national_id": null,
"created": "2026-08-31T09:14:22.418293",
"last_modified": "2026-08-31T09:14:22.418293"
}
}

An entity account needs at least one identifier besides its name: a customer ID (customer_id), an address or a national ID. An individual can also use a date and place of birth, sent together.

Step 2: Record and link the customer’s wallet

Next, record the customer’s sending wallet and link it to their account. One account can have many wallets, for different assets such as BTC, XRP and ETH.

Use POST /api/v2/analytics/chains/{chain}/addresses/{address}. Put the chain and the wallet address in the path, and set account_ref_id to the account’s reference_id from Step 1. The same call can also:

  • screen the wallet for risk with a blockchain Analytics provider ("scan_for_risk": true). Leave out provider_name to use your business’s default provider.

  • declare the wallet as self-hosted ("is_self_hosted": true), as opposed to a wallet a VASP holds for its customer.

This example records the wallet without a risk scan, so risk_data is null.

Sample Request

Shell · Sample data

curl -X POST 'https://sandbox.ospree.io/api/v2/analytics/chains/bitcoin/addresses/bc1q8yj0herd4r4yxszw3nkfvt53433thk0f5qst4g' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data '{
"scan_for_risk": false,
"is_self_hosted": false,
"account_ref_id": "digital-capital"
}'

200

JSON · Sample data

{
"status": "success",
"data": {
"address": "bc1q8yj0herd4r4yxszw3nkfvt53433thk0f5qst4g",
"chain": "bitcoin",
"symbol": "BTC",
"is_self_hosted": false,
"financial_data": {
"balance": 78317.03538006,
"balance_usd": 6465346163.418137
},
"risk_data": null,
"created": "2026-08-31T09:15:02.118201"
}
}

When you set "scan_for_risk": true, risk_data is a list holding the latest risk result. It is null, not an empty list, when no risk scan has run.

Step 3: Create a beneficiary account

Store the beneficiary as an account too, so you can reuse it in later transfers. The beneficiary account is optional on a transfer, but we recommend creating one, even when customers send funds to themselves.

Use POST /api/v2/directory/accounts again. Set account_category to non-customer, because the beneficiary is not your customer.

Sample Request

Shell · Sample data

curl -X POST 'https://sandbox.ospree.io/api/v2/directory/accounts' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data-raw '{
"reference_id": "blockchain-finanz",
"account_type": "entity",
"account_category": "non-customer",
"email": "info@blockchainfinanz.example",
"entity": {
"registration_country": "DE",
"entity_name": {
"name_type": "LEGL",
"name_legal": "Blockchain Finanz GmbH",
"name_business": "Blockchain Finanz Solutions"
}
},
"address": {
"address_type": "BIZZ",
"address_street_no": "27",
"address_street_name": "Friedrichstrasse",
"address_floor": "5",
"address_room": "502",
"address_city": "Berlin",
"address_region": "Berlin",
"address_district": "Mitte",
"address_postcode": "10117",
"address_country_code": "DE"
}
}'

200

JSON · Sample data

{
"status": "success",
"data": {
"reference_id": "blockchain-finanz",
"account_type": "entity",
"account_category": "non-customer",
"email": "info@blockchainfinanz.example",
"customer_id": null,
"individual": null,
"entity": {
"entity_name": {
"name_type": "LEGL",
"name_legal": "Blockchain Finanz GmbH",
"name_business": "Blockchain Finanz Solutions"
},
"entity_localname": null,
"registration_country": "DE"
},
"address": {
"address_type": "BIZZ",
"address_line": null,
"address_street_no": "27",
"address_street_name": "Friedrichstrasse",
"address_building_name": null,
"address_floor": "5",
"address_room": "502",
"address_department": null,
"address_subdepartment": null,
"address_postbox": null,
"address_city_location": null,
"address_city": "Berlin",
"address_region": "Berlin",
"address_district": "Mitte",
"address_postcode": "10117",
"address_country_code": "DE"
},
"national_id": null,
"created": "2026-08-31T09:16:40.502917",
"last_modified": "2026-08-31T09:16:40.502917"
}
}

Step 4: Record and link the beneficiary’s wallet

Record the beneficiary’s wallet and link it to the beneficiary account, as in Step 2. This wallet is self-hosted, so set "is_self_hosted": true. You can also screen it for risk before you send funds.

Sample Request

Shell · Sample data

curl -X POST 'https://sandbox.ospree.io/api/v2/analytics/chains/bitcoin/addresses/1LrxsRd7zNuxPJcL5rttnoeJFy1y4AffYY' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data '{
"scan_for_risk": false,
"is_self_hosted": true,
"account_ref_id": "blockchain-finanz"
}'

200

JSON · Sample data

{
"status": "success",
"data": {
"address": "1LrxsRd7zNuxPJcL5rttnoeJFy1y4AffYY",
"chain": "bitcoin",
"symbol": "BTC",
"is_self_hosted": true,
"financial_data": {
"balance": 0.00147365,
"balance_usd": 121.56614838949999
},
"risk_data": null,
"created": "2026-08-31T09:17:11.806289"
}
}

Step 5: Create the Travel Rule transfer

Now create the transfer with POST /api/v2/travelrule/transfers. Ospree reads the originator and beneficiary details from the accounts you name in originator_account_reference_id (required) and beneficiary_account_reference_id.

The funds go to a self-hosted wallet, so this transfer is a Record: there is no VASP on the other side to send Travel Rule data to. Send:

  • "beneficiary_address_is_self_hosted": true to declare the self-hosted wallet on this transfer.

  • "is_record": true.

  • no protocol and no beneficiary_vasp_id. Ospree sets the beneficiary VASP ID to the reserved SLFHST value.

reference_id is your own ID for the transfer, and also its idempotency key. A fresh create returns 201 Created. If you send the same reference_id again, nothing new is created: you get the original transfer back with 200 OK and the header Idempotent-Replayed: true. So it is safe to retry a request that timed out.

Sample Request

Shell · Sample data

curl -X POST 'https://sandbox.ospree.io/api/v2/travelrule/transfers' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data '{
"amount": 1.44,
"dti": "4H95J0R2X",
"is_record": true,
"reference_id": "quickstart-transfer-001",
"originator_address": "bc1q8yj0herd4r4yxszw3nkfvt53433thk0f5qst4g",
"originator_account_reference_id": "digital-capital",
"beneficiary_address": "1LrxsRd7zNuxPJcL5rttnoeJFy1y4AffYY",
"beneficiary_address_is_self_hosted": true,
"beneficiary_account_reference_id": "blockchain-finanz"
}'

201

JSON · Sample data

{
"status": "success",
"data": {
"transfer_id": "067cee70-d42a-7d59-8000-8c3db2f0c34c",
"reference_id": "quickstart-transfer-001",
"amount": 1.44,
"amount_usd": 118942.19,
"dti": "4H95J0R2X",
"chain": "bitcoin",
"symbol": "BTC",
"protocol": null,
"originator_vasp_id": "UVWDEP",
"beneficiary_vasp_id": "SLFHST",
"originator_address": "bc1q8yj0herd4r4yxszw3nkfvt53433thk0f5qst4g",
"beneficiary_address": "1LrxsRd7zNuxPJcL5rttnoeJFy1y4AffYY",
"originator_address_is_self_hosted": false,
"beneficiary_address_is_self_hosted": true,
"routing_number": null,
"originator_account_reference_id": "digital-capital",
"beneficiary_account_reference_id": "blockchain-finanz",
"transaction_hash": null,
"transfer_status": "INITIATED",
"transfer_type": "RECORD",
"amount_str": "1.44"
}
}

originator_vasp_id is your own VASP ID, so yours will differ from the example. transfer_id, amount_usd and the timestamps will differ too.

Sending to another VASP instead? A withdrawal to a wallet held by another VASP is an Instruction: Ospree sends the Travel Rule data to that VASP. Leave out is_record and the self-hosted flag, and send:

  • beneficiary_vasp_id: the beneficiary VASP’s 6-character ID, for example "MLESJF".

  • protocol: one of flow, trp, cryptoswift, trisa or cardano. trp also needs a travel_address.

To choose the protocol, search for the VASP with GET /api/v2/directory/vasps/search, by name or by destination wallet (wallet_address plus dti). Each result lists the protocols that VASP supports in supported_protocols. A flow transfer to a VASP that is not active on Ospree is refused with 422.

Travel Rule adoption is still growing, and many VASPs do not have a Travel Rule solution yet. We keep the VASP directory up to date. For help, contact support@ospree.io.

What is a DTI? A Digital Token Identifier (DTI) is the ISO 24165 standard identifier for a digital token. Each asset has its own DTI; 4H95J0R2X is Bitcoin. List the DTIs Ospree accepts with GET /api/v2/travelrule/tokens/, optionally filtered by chain or symbol. For more on DTIs, see https://dtif.org/.

transaction_hash is optional. Usually you create the Travel Rule transfer first and send the blockchain transaction after the Travel Rule exchange is done. Then add the hash with PATCH /api/v2/travelrule/transfers/{transfer_id}. If you send the blockchain transaction first, include transaction_hash when you create the transfer.