Skip to main content
POST
/
exchanges
Create Exchange
curl --request POST \
  --url https://api.dfns.io/exchanges \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-DFNS-USERACTION: <api-key>' \
  --data '{
  "name": "<string>",
  "kind": "Binance",
  "readConfiguration": {
    "publicApiKey": "<string>",
    "privateApiKey": "<string>",
    "password": "<string>",
    "otp": "<string>"
  },
  "writeConfiguration": {
    "publicApiKey": "<string>",
    "privateApiKey": "<string>",
    "password": "<string>",
    "otp": "<string>"
  }
}'
{
  "id": "<string>",
  "name": "<string>",
  "kind": "Binance",
  "dateCreated": "<string>"
}

Authentication

✅ Organization User (CustomerEmployee)
❌ Delegated User (EndUser)
❌ Service Account

Required Permissions

Exchanges:Create: Always required.

Authorizations

Authorization
string
header
required

Bearer Token: Used to authenticate API requests. More details how to generate the token: Authentication flows

X-DFNS-USERACTION
string
header
required

User Action Signature: Used to sign the change-inducing API requests. More details how to generate the token: User Action Signing flows

Body

application/json
kind
enum<string>
required
Available options:
Binance,
Kraken,
CoinbaseApp,
CoinbasePrime
readConfiguration
object
required
writeConfiguration
object
required
name
string
Maximum length: 100

Response

200 - application/json

Success

id
string
required
kind
enum<string>
required
Available options:
Binance,
Kraken,
CoinbaseApp,
CoinbasePrime
dateCreated
string
required
name
string
I