bitcain docs
API Reference

Social

Social trading feed - follow top traders, view community activity, manage privacy settings

Get Personalized Feed

GET
/api/v1/social/social/feed

Authorization

HTTPBearer
AuthorizationBearer <token>

In: header

Query Parameters

page?integer

Page number

Default1
Range1 <= value
page_size?integer

Items per page

Default20
Range1 <= value <= 100
event_type?|

Filter by event type

Response Body

application/json

application/json

curl -X GET "https://loading/api/v1/social/social/feed"
{
  "events": [
    {
      "event_type": "trade_opened",
      "title": "string",
      "description": "string",
      "metadata": {},
      "trade_id": "716cb486-5256-4659-973c-189b58daa723",
      "discussion_id": "4a1a65c7-bdf0-4314-aad5-d04482b0013c",
      "visibility": "public",
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",
      "view_count": 0,
      "like_count": 0,
      "comment_count": 0,
      "is_flagged": false,
      "is_hidden": false,
      "created_at": "2019-08-24T14:15:22Z",
      "display_name": "string",
      "avatar_url": "string",
      "is_following": false
    }
  ],
  "total": 0,
  "page": 1,
  "page_size": 1,
  "has_more": true
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

Get Top Traders

GET
/api/v1/social/social/top-traders

Authorization

HTTPBearer
AuthorizationBearer <token>

In: header

Query Parameters

limit?integer

Number of traders to return

Default50
Range1 <= value <= 100
min_trades?integer

Minimum trades required

Default10
Range1 <= value

Response Body

application/json

application/json

curl -X GET "https://loading/api/v1/social/social/top-traders"
{
  "traders": [
    {
      "display_name": "string",
      "bio": "string",
      "avatar_url": "string",
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",
      "total_trades": 0,
      "winning_trades": 0,
      "losing_trades": 0,
      "win_rate": "0.00",
      "total_pnl": "0.00",
      "total_pnl_percent": "0.00",
      "avg_trade_duration_seconds": 0,
      "best_trade_pnl": "0.00",
      "worst_trade_pnl": "0.00",
      "max_drawdown": "0.00",
      "sharpe_ratio": "0.00",
      "follower_count": 0,
      "following_count": 0,
      "rank": 0,
      "rank_percentile": "string",
      "stats_last_updated": "2019-08-24T14:15:22Z",
      "created_at": "2019-08-24T14:15:22Z",
      "updated_at": "2019-08-24T14:15:22Z"
    }
  ],
  "total": 0,
  "min_trades_threshold": 10
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

Get Trader Profile

GET
/api/v1/social/social/traders/{user_id}

Authorization

HTTPBearer
AuthorizationBearer <token>

In: header

Path Parameters

user_id*string

Response Body

application/json

application/json

curl -X GET "https://loading/api/v1/social/social/traders/string"
{
  "display_name": "string",
  "bio": "string",
  "avatar_url": "string",
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",
  "total_trades": 0,
  "winning_trades": 0,
  "losing_trades": 0,
  "win_rate": "0.00",
  "total_pnl": "0.00",
  "total_pnl_percent": "0.00",
  "avg_trade_duration_seconds": 0,
  "best_trade_pnl": "0.00",
  "worst_trade_pnl": "0.00",
  "max_drawdown": "0.00",
  "sharpe_ratio": "0.00",
  "follower_count": 0,
  "following_count": 0,
  "rank": 0,
  "rank_percentile": "string",
  "stats_last_updated": "2019-08-24T14:15:22Z",
  "created_at": "2019-08-24T14:15:22Z",
  "updated_at": "2019-08-24T14:15:22Z"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

Get Following

GET
/api/v1/social/social/following

Authorization

HTTPBearer
AuthorizationBearer <token>

In: header

Query Parameters

page?integer

Page number

Default1
Range1 <= value
page_size?integer

Items per page

Default50
Range1 <= value <= 100

Response Body

application/json

application/json

curl -X GET "https://loading/api/v1/social/social/following"
{
  "followers": [
    {
      "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",
      "display_name": "string",
      "avatar_url": "string",
      "follower_count": 0,
      "following_count": 0,
      "is_following": true,
      "followed_at": "2019-08-24T14:15:22Z"
    }
  ],
  "total": 0,
  "page": 1,
  "page_size": 1,
  "has_more": true
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

Get Followers

GET
/api/v1/social/social/followers

Authorization

HTTPBearer
AuthorizationBearer <token>

In: header

Query Parameters

page?integer

Page number

Default1
Range1 <= value
page_size?integer

Items per page

Default50
Range1 <= value <= 100

Response Body

application/json

application/json

curl -X GET "https://loading/api/v1/social/social/followers"
{
  "followers": [
    {
      "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",
      "display_name": "string",
      "avatar_url": "string",
      "follower_count": 0,
      "following_count": 0,
      "is_following": true,
      "followed_at": "2019-08-24T14:15:22Z"
    }
  ],
  "total": 0,
  "page": 1,
  "page_size": 1,
  "has_more": true
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

Follow Trader

POST
/api/v1/social/social/follow/{user_id}

Authorization

HTTPBearer
AuthorizationBearer <token>

In: header

Path Parameters

user_id*string

Response Body

application/json

application/json

curl -X POST "https://loading/api/v1/social/social/follow/string"
{
  "property1": "string",
  "property2": "string"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

Unfollow Trader

DELETE
/api/v1/social/social/follow/{user_id}

Authorization

HTTPBearer
AuthorizationBearer <token>

In: header

Path Parameters

user_id*string

Response Body

application/json

curl -X DELETE "https://loading/api/v1/social/social/follow/string"
Empty
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

Get Privacy Settings

GET
/api/v1/social/social/privacy-settings

Authorization

HTTPBearer
AuthorizationBearer <token>

In: header

Response Body

application/json

curl -X GET "https://loading/api/v1/social/social/privacy-settings"
{
  "profile_visibility": "public",
  "show_trades": true,
  "show_portfolio_value": false,
  "show_pnl": true,
  "allow_followers": true,
  "anonymous_mode": false,
  "show_in_leaderboard": true,
  "show_trade_history": false,
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",
  "created_at": "2019-08-24T14:15:22Z",
  "updated_at": "2019-08-24T14:15:22Z"
}

Update Privacy Settings

PUT
/api/v1/social/social/privacy-settings

Authorization

HTTPBearer
AuthorizationBearer <token>

In: header

Request Body

application/json

profile_visibility?|
show_trades?|
show_portfolio_value?|
show_pnl?|
allow_followers?|
anonymous_mode?|
show_in_leaderboard?|
show_trade_history?|

Response Body

application/json

application/json

curl -X PUT "https://loading/api/v1/social/social/privacy-settings" \  -H "Content-Type: application/json" \  -d '{}'
{
  "profile_visibility": "public",
  "show_trades": true,
  "show_portfolio_value": false,
  "show_pnl": true,
  "allow_followers": true,
  "anonymous_mode": false,
  "show_in_leaderboard": true,
  "show_trade_history": false,
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",
  "created_at": "2019-08-24T14:15:22Z",
  "updated_at": "2019-08-24T14:15:22Z"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

Report Content

POST
/api/v1/social/social/report

Authorization

HTTPBearer
AuthorizationBearer <token>

In: header

Request Body

application/json

report_type*string

Report type enumeration.

Value in"spam" | "pump_and_dump" | "harassment" | "misinformation" | "inappropriate" | "other"
reason*string
Length1 <= length
reported_event_id?|
reported_user_id?|

Response Body

application/json

application/json

curl -X POST "https://loading/api/v1/social/social/report" \  -H "Content-Type: application/json" \  -d '{    "report_type": "spam",    "reason": "string"  }'
{
  "report_type": "spam",
  "reason": "string",
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "reporter_id": "7a076ebc-1c4c-415a-9094-959996abc3de",
  "reported_event_id": "4b5f11a0-1b5d-4c75-bc8d-507b97a3f273",
  "reported_user_id": "f916fbd7-b6fb-4fd7-9d37-bd9182c4dbce",
  "status": "pending",
  "reviewed_by": "92ab4dbc-1b27-40ce-b24b-7dde8f4709be",
  "reviewed_at": "2019-08-24T14:15:22Z",
  "review_notes": "string",
  "action_taken": "string",
  "created_at": "2019-08-24T14:15:22Z",
  "updated_at": "2019-08-24T14:15:22Z"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

Create Discussion

POST
/api/v1/social/social/discussions

Authorization

HTTPBearer
AuthorizationBearer <token>

In: header

Request Body

application/json

title*string
Length1 <= length <= 255
content*string
Length1 <= length
tags?array<>
Itemsitems <= 10
parent_id?|

Response Body

application/json

application/json

curl -X POST "https://loading/api/v1/social/social/discussions" \  -H "Content-Type: application/json" \  -d '{    "title": "string",    "content": "string"  }'
{
  "title": "string",
  "content": "string",
  "tags": [
    "string"
  ],
  "parent_id": "1c6ca187-e61f-4301-8dcb-0e9749e89eef",
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",
  "reply_count": 0,
  "like_count": 0,
  "view_count": 0,
  "is_pinned": false,
  "is_locked": false,
  "created_at": "2019-08-24T14:15:22Z",
  "updated_at": "2019-08-24T14:15:22Z",
  "display_name": "string",
  "avatar_url": "string"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

Get Discussion

GET
/api/v1/social/social/discussions/{discussion_id}

Authorization

HTTPBearer
AuthorizationBearer <token>

In: header

Path Parameters

discussion_id*string

Response Body

application/json

application/json

curl -X GET "https://loading/api/v1/social/social/discussions/string"
{
  "title": "string",
  "content": "string",
  "tags": [
    "string"
  ],
  "parent_id": "1c6ca187-e61f-4301-8dcb-0e9749e89eef",
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",
  "reply_count": 0,
  "like_count": 0,
  "view_count": 0,
  "is_pinned": false,
  "is_locked": false,
  "created_at": "2019-08-24T14:15:22Z",
  "updated_at": "2019-08-24T14:15:22Z",
  "display_name": "string",
  "avatar_url": "string"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}