bitcain docs
API Reference

Preferences

User preferences - notifications, trading defaults, and UI settings

Get Preferences

GET
/api/v1/preferences

Authorization

HTTPBearer
AuthorizationBearer <token>

In: header

Response Body

application/json

curl -X GET "https://loading/api/v1/preferences"
{
  "success": true,
  "preferences": {
    "notifications": {
      "trade_alerts": true,
      "price_alerts": true,
      "news_alerts": false,
      "portfolio_alerts": true,
      "email_notifications": true,
      "push_notifications": false,
      "alert_threshold": 5,
      "channel_config": {
        "property1": [
          "string"
        ],
        "property2": [
          "string"
        ]
      }
    },
    "trading": {
      "default_exchange": "binance",
      "default_pair": "BTC/USDT",
      "risk_level": "conservative"
    },
    "ui": {
      "theme": "dark",
      "compact_mode": false,
      "show_balances": true
    },
    "payouts": {
      "payout_schedule": "weekly",
      "payment_method": "bank_transfer",
      "min_payout_threshold": "50.00",
      "email_notifications": true
    }
  },
  "message": "string"
}

Patch Preferences

PATCH
/api/v1/preferences

Authorization

HTTPBearer
AuthorizationBearer <token>

In: header

Request Body

application/json

notifications?|
trading?|
ui?|
payouts?|

Response Body

application/json

application/json

curl -X PATCH "https://loading/api/v1/preferences" \  -H "Content-Type: application/json" \  -d '{}'
{
  "success": true,
  "preferences": {
    "notifications": {
      "trade_alerts": true,
      "price_alerts": true,
      "news_alerts": false,
      "portfolio_alerts": true,
      "email_notifications": true,
      "push_notifications": false,
      "alert_threshold": 5,
      "channel_config": {
        "property1": [
          "string"
        ],
        "property2": [
          "string"
        ]
      }
    },
    "trading": {
      "default_exchange": "binance",
      "default_pair": "BTC/USDT",
      "risk_level": "conservative"
    },
    "ui": {
      "theme": "dark",
      "compact_mode": false,
      "show_balances": true
    },
    "payouts": {
      "payout_schedule": "weekly",
      "payment_method": "bank_transfer",
      "min_payout_threshold": "50.00",
      "email_notifications": true
    }
  },
  "message": "string"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

Update All Preferences

PUT
/api/v1/preferences

Authorization

HTTPBearer
AuthorizationBearer <token>

In: header

Request Body

application/json

notifications?

Notification preference settings.

trading?

Trading default settings.

ui?

UI preference settings.

payouts?

Referral payout preference settings.

Response Body

application/json

application/json

curl -X PUT "https://loading/api/v1/preferences" \  -H "Content-Type: application/json" \  -d '{}'
{
  "success": true,
  "preferences": {
    "notifications": {
      "trade_alerts": true,
      "price_alerts": true,
      "news_alerts": false,
      "portfolio_alerts": true,
      "email_notifications": true,
      "push_notifications": false,
      "alert_threshold": 5,
      "channel_config": {
        "property1": [
          "string"
        ],
        "property2": [
          "string"
        ]
      }
    },
    "trading": {
      "default_exchange": "binance",
      "default_pair": "BTC/USDT",
      "risk_level": "conservative"
    },
    "ui": {
      "theme": "dark",
      "compact_mode": false,
      "show_balances": true
    },
    "payouts": {
      "payout_schedule": "weekly",
      "payment_method": "bank_transfer",
      "min_payout_threshold": "50.00",
      "email_notifications": true
    }
  },
  "message": "string"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

Update Notification Preferences

PATCH
/api/v1/preferences/notifications

Authorization

HTTPBearer
AuthorizationBearer <token>

In: header

Request Body

application/json

trade_alerts?boolean

Alert on trade execution

Defaulttrue
price_alerts?boolean

Alert on price thresholds

Defaulttrue
news_alerts?boolean

Alert on news events

Defaultfalse
portfolio_alerts?boolean

Alert on portfolio changes

Defaulttrue
email_notifications?boolean

Send email notifications

Defaulttrue
push_notifications?boolean

Send push notifications

Defaultfalse
alert_threshold?number

Price change threshold (%)

Default5
Range0.1 <= value <= 50
channel_config?

Per-alert-type channel configuration (alert_type -> [channels])

Response Body

application/json

application/json

curl -X PATCH "https://loading/api/v1/preferences/notifications" \  -H "Content-Type: application/json" \  -d '{}'
{
  "success": true,
  "preferences": {
    "notifications": {
      "trade_alerts": true,
      "price_alerts": true,
      "news_alerts": false,
      "portfolio_alerts": true,
      "email_notifications": true,
      "push_notifications": false,
      "alert_threshold": 5,
      "channel_config": {
        "property1": [
          "string"
        ],
        "property2": [
          "string"
        ]
      }
    },
    "trading": {
      "default_exchange": "binance",
      "default_pair": "BTC/USDT",
      "risk_level": "conservative"
    },
    "ui": {
      "theme": "dark",
      "compact_mode": false,
      "show_balances": true
    },
    "payouts": {
      "payout_schedule": "weekly",
      "payment_method": "bank_transfer",
      "min_payout_threshold": "50.00",
      "email_notifications": true
    }
  },
  "message": "string"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

Update Trading Preferences

PATCH
/api/v1/preferences/trading

Authorization

HTTPBearer
AuthorizationBearer <token>

In: header

Request Body

application/json

default_exchange?string

Default exchange for trading

Default"binance"
default_pair?string

Default trading pair

Default"BTC/USDT"
risk_level?string

Risk tolerance level

Default"moderate"
Value in"conservative" | "moderate" | "aggressive"

Response Body

application/json

application/json

curl -X PATCH "https://loading/api/v1/preferences/trading" \  -H "Content-Type: application/json" \  -d '{}'
{
  "success": true,
  "preferences": {
    "notifications": {
      "trade_alerts": true,
      "price_alerts": true,
      "news_alerts": false,
      "portfolio_alerts": true,
      "email_notifications": true,
      "push_notifications": false,
      "alert_threshold": 5,
      "channel_config": {
        "property1": [
          "string"
        ],
        "property2": [
          "string"
        ]
      }
    },
    "trading": {
      "default_exchange": "binance",
      "default_pair": "BTC/USDT",
      "risk_level": "conservative"
    },
    "ui": {
      "theme": "dark",
      "compact_mode": false,
      "show_balances": true
    },
    "payouts": {
      "payout_schedule": "weekly",
      "payment_method": "bank_transfer",
      "min_payout_threshold": "50.00",
      "email_notifications": true
    }
  },
  "message": "string"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

Update Ui Preferences

PATCH
/api/v1/preferences/ui

Authorization

HTTPBearer
AuthorizationBearer <token>

In: header

Request Body

application/json

theme?string

UI theme

Default"dark"
Value in"dark" | "light" | "system"
compact_mode?boolean

Use compact UI layout

Defaultfalse
show_balances?boolean

Show balance amounts

Defaulttrue

Response Body

application/json

application/json

curl -X PATCH "https://loading/api/v1/preferences/ui" \  -H "Content-Type: application/json" \  -d '{}'
{
  "success": true,
  "preferences": {
    "notifications": {
      "trade_alerts": true,
      "price_alerts": true,
      "news_alerts": false,
      "portfolio_alerts": true,
      "email_notifications": true,
      "push_notifications": false,
      "alert_threshold": 5,
      "channel_config": {
        "property1": [
          "string"
        ],
        "property2": [
          "string"
        ]
      }
    },
    "trading": {
      "default_exchange": "binance",
      "default_pair": "BTC/USDT",
      "risk_level": "conservative"
    },
    "ui": {
      "theme": "dark",
      "compact_mode": false,
      "show_balances": true
    },
    "payouts": {
      "payout_schedule": "weekly",
      "payment_method": "bank_transfer",
      "min_payout_threshold": "50.00",
      "email_notifications": true
    }
  },
  "message": "string"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

Update Payout Preferences

PATCH
/api/v1/preferences/payouts

Authorization

HTTPBearer
AuthorizationBearer <token>

In: header

Request Body

application/json

payout_schedule?string

Preferred payout schedule

Default"weekly"
Value in"weekly" | "monthly" | "manual"
payment_method?string

Preferred payment method

Default"bank_transfer"
min_payout_threshold?|

Minimum payout threshold (USD)

Default"50.00"
email_notifications?boolean

Email notifications for payouts

Defaulttrue

Response Body

application/json

application/json

curl -X PATCH "https://loading/api/v1/preferences/payouts" \  -H "Content-Type: application/json" \  -d '{}'
{
  "success": true,
  "preferences": {
    "notifications": {
      "trade_alerts": true,
      "price_alerts": true,
      "news_alerts": false,
      "portfolio_alerts": true,
      "email_notifications": true,
      "push_notifications": false,
      "alert_threshold": 5,
      "channel_config": {
        "property1": [
          "string"
        ],
        "property2": [
          "string"
        ]
      }
    },
    "trading": {
      "default_exchange": "binance",
      "default_pair": "BTC/USDT",
      "risk_level": "conservative"
    },
    "ui": {
      "theme": "dark",
      "compact_mode": false,
      "show_balances": true
    },
    "payouts": {
      "payout_schedule": "weekly",
      "payment_method": "bank_transfer",
      "min_payout_threshold": "50.00",
      "email_notifications": true
    }
  },
  "message": "string"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

Reset Preferences

POST
/api/v1/preferences/reset

Authorization

HTTPBearer
AuthorizationBearer <token>

In: header

Response Body

application/json

curl -X POST "https://loading/api/v1/preferences/reset"
{
  "success": true,
  "preferences": {
    "notifications": {
      "trade_alerts": true,
      "price_alerts": true,
      "news_alerts": false,
      "portfolio_alerts": true,
      "email_notifications": true,
      "push_notifications": false,
      "alert_threshold": 5,
      "channel_config": {
        "property1": [
          "string"
        ],
        "property2": [
          "string"
        ]
      }
    },
    "trading": {
      "default_exchange": "binance",
      "default_pair": "BTC/USDT",
      "risk_level": "conservative"
    },
    "ui": {
      "theme": "dark",
      "compact_mode": false,
      "show_balances": true
    },
    "payouts": {
      "payout_schedule": "weekly",
      "payment_method": "bank_transfer",
      "min_payout_threshold": "50.00",
      "email_notifications": true
    }
  },
  "message": "string"
}