公司行動
此端點用於查詢用戶帳戶的公司行動紀錄。
拆合股
HTTP 請求
bash
GET /account/v1/splits📥 查詢參數
| 參數 | 類型 | 必填 | 說明 | 範例值 |
|---|---|---|---|---|
page | int | 否 | 當前頁碼 | 預設 1 |
page_size | int | 否 | 每頁筆數 | 預設 20 |
market | enum | 是 | 市場類型 | 市場代碼。詳見market 列舉支援值。 |
symbol | string | 否 | 股票代碼 | BTC-USDT |
start_time | long | 是 | 查詢區間起始日期(Unix 秒級時間戳) | 1736775317 |
end_time | long | 是 | 查詢區間結束日期(Unix 秒級時間戳) | 1746775317 |
✅ 成功回應
回應欄位
| 欄位 | 類型 | 說明 |
|---|---|---|
symbol | string | 股票代碼 |
market | enum | 市場類型(詳見market 枚舉) |
action_type | enum | 公司行動類型(詳見 action_type 枚舉) |
pre_positions | decimal | 原持倉數量 |
position | decimal | 拆合股后持倉數量 |
distribution_plan | string | 拆合股分配方案 |
date | long | 拆合股日(Unix 毫秒時間戳) |
currency | string | 幣種 |
handling_fee | decimal | 手續費 |
refund_amount | decimal | 退還金額 |
create_time | long | 操作時間(Unix 毫秒時間戳) |
❌ 錯誤回應
錯誤欄位
| 欄位 | 類型 | 說明 |
|---|---|---|
code | int | 錯誤代碼 |
message | string | 錯誤訊息(人類可讀) |
details | string | 其他錯誤資訊 |
💡 cURL 範例
curl -X GET "https://{{base_url}}/account/v1/splits?market=dcex&start_time=1634897025&end_time=1761127425" \
-H "X-API-Key: YOUR_API_KEY" \
-H "X-API-Timestamp: 1345678912312" \
-H "X-API-Signature: YOUR_GENERATED_SIGNATURE" \
-H "Content-Type: application/json"✅ 成功回應範例
json
{
"code": 0,
"data": {
"total_records": 1,
"page": 1,
"page_size": 20,
"stock_splits": [
{
"symbol": "BTC-USDT",
"market": "dcex",
"action_type": "reverse_split",
"pre_positions": 13,
"positions": 1,
"distribution_plan": "code 1 for 10 reverse stock split",
"date": 1691121600000,
"currency": "USDT",
"handling_fee": 0.5,
"refund_amount": 0,
"create_time": 1704782443000
}
]
}
}❌ 錯誤回應範例
json
{
"code": 12010012,
"message": "Internal server error"
}分紅派息
HTTP 請求
bash
GET /account/v1/dividends📥 查詢參數
| 參數 | 類型 | 必填 | 說明 | 範例值 |
|---|---|---|---|---|
page | int | 否 | 當前頁碼 | 預設 1 |
page_size | int | 否 | 每頁筆數 | 預設 20 |
market | enum | 是 | 市場類型 | 市場代碼。詳見market 列舉支援值。 |
symbol | string | 否 | 股票代碼 | BTC-USDT |
start_time | long | 是 | 查詢區間起始日期(Unix 秒級時間戳) | 1736775317 |
end_time | long | 是 | 查詢區間結束日期(Unix 秒級時間戳) | 1746775317 |
✅ 成功回應
回應欄位
| 欄位 | 類型 | 說明 |
|---|---|---|
symbol | string | 股票代碼 |
market | enum | 市場類型(詳見market 枚舉) |
action_type | enum | 公司行動類型(詳見 action_type 枚舉) |
ex_dividend_date | long | 除净日(Unix 毫秒時間戳) |
dividend_date | long | 派息日(Unix 毫秒時間戳) |
pre_positions | decimal | 原持倉數量 |
distribution_plan | string | 分配方案 |
currency | string | 幣種 |
pre_tax_dividend | decimal | 稅前股息 |
tax_rate | decimal | 稅率 |
handling_fee | decimal | 手續費 |
dividend_amount | decimal | 派息金額 |
create_time | long | 操作時間(Unix 毫秒時間戳) |
❌ 錯誤回應
錯誤欄位
| 欄位 | 類型 | 說明 |
|---|---|---|
code | int | 錯誤代碼 |
message | string | 錯誤訊息(人類可讀) |
details | string | 其他錯誤資訊 |
💡 cURL 範例
curl -X GET "https://{{base_url}}/account/v1/dividends?market=dcex&start_time=1634897025&end_time=1761127425" \
-H "X-API-Key: YOUR_API_KEY" \
-H "X-API-Timestamp: 1345678912312" \
-H "X-API-Signature: YOUR_GENERATED_SIGNATURE" \
-H "Content-Type: application/json"✅ 成功回應範例
json
{
"code": 0,
"data": {
"total_records": 1,
"page": 1,
"page_size": 20,
"stock_dividends": [
{
"symbol": "BTC-USDT",
"market": "dcex",
"action_type": "dividend",
"ex_dividend_date": 1695614400000,
"dividend_date": 1695873600000,
"distribution_plan": "1Share Dividend 0.075000003USDT",
"pre_positions": 2,
"currency": "USDT",
"pre_tax_dividend": 0.15000001,
"tax_rate": 0.3,
"handling_fee": 0.01,
"dividend_amount": 0.095,
"create_time": 1695806795000
}
]
}
}❌ 錯誤回應範例
json
{
"code": 12010012,
"message": "Internal server error"
}
