bitcain docs
API Reference

Social

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

Get Personalized Feed

GET
/api/v1/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/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,
      "reactions": {
        "property1": 0,
        "property2": 0
      },
      "viewer_reactions": [
        "string"
      ]
    }
  ],
  "total": 0,
  "page": 1,
  "page_size": 1,
  "has_more": true
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

Add Reaction

POST
/api/v1/social/events/{event_id}/reactions

Authorization

HTTPBearer
AuthorizationBearer <token>

In: header

Path Parameters

event_id*string
Formatuuid

Request Body

application/json

emoji*string
Length1 <= length <= 8

Response Body

application/json

application/json

curl -X POST "https://loading/api/v1/social/events/497f6eca-6276-4993-bfeb-53cbbbba6f08/reactions" \  -H "Content-Type: application/json" \  -d '{    "emoji": "string"  }'
{
  "event_id": "a7a26ff2-e851-45b6-9634-d595f45458b7",
  "reactions": {
    "property1": 0,
    "property2": 0
  },
  "viewer_reactions": [
    "string"
  ]
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

Remove Reaction

DELETE
/api/v1/social/events/{event_id}/reactions/{emoji}

Authorization

HTTPBearer
AuthorizationBearer <token>

In: header

Path Parameters

event_id*string
Formatuuid
emoji*string

Response Body

application/json

application/json

curl -X DELETE "https://loading/api/v1/social/events/497f6eca-6276-4993-bfeb-53cbbbba6f08/reactions/string"
{
  "event_id": "a7a26ff2-e851-45b6-9634-d595f45458b7",
  "reactions": {
    "property1": 0,
    "property2": 0
  },
  "viewer_reactions": [
    "string"
  ]
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

Get Top Traders

GET
/api/v1/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/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",
      "status_emoji": "string",
      "flair": {},
      "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": {}
    }
  ]
}

Search Users

GET
/api/v1/social/users/search

Authorization

HTTPBearer
AuthorizationBearer <token>

In: header

Query Parameters

q?|

Search term (username / name); blank browses the directory

sort?string

Sort order: followers | recent | active

Default"followers"
Match^(followers|recent|active)$
exclude_following?boolean

Exclude people the caller already follows (who-to-follow mode)

Defaultfalse
limit?integer
Default24
Range1 <= value <= 100
offset?integer
Default0
Range0 <= value

Response Body

application/json

application/json

curl -X GET "https://loading/api/v1/social/users/search"
{
  "results": [
    {
      "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",
      "display_name": "string",
      "username": "string",
      "avatar_url": "string",
      "status_emoji": "string",
      "stance": "string",
      "bio": "string",
      "follower_count": 0,
      "badge_count": 0,
      "total_trades": 0,
      "is_following": false
    }
  ],
  "total": 0,
  "limit": 1,
  "offset": 0,
  "query": "string"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

Get Trader Profile

GET
/api/v1/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/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",
  "status_emoji": "string",
  "flair": {},
  "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/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/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/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/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/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/follow/string"
{
  "property1": "string",
  "property2": "string"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

Unfollow Trader

DELETE
/api/v1/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/follow/string"
Empty
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

Get Privacy Settings

GET
/api/v1/social/privacy-settings

Authorization

HTTPBearer
AuthorizationBearer <token>

In: header

Response Body

application/json

curl -X GET "https://loading/api/v1/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/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/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": {}
    }
  ]
}

Update My Profile

PUT
/api/v1/social/me/profile

Authorization

HTTPBearer
AuthorizationBearer <token>

In: header

Request Body

application/json

username?|
full_name?|
bio?|
status_emoji?|
stance?|

Response Body

application/json

application/json

curl -X PUT "https://loading/api/v1/social/me/profile" \  -H "Content-Type: application/json" \  -d '{}'
{
  "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",
  "username": "string",
  "full_name": "string",
  "bio": "string",
  "avatar_url": "string",
  "status_emoji": "string",
  "flair": {}
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

Report Content

POST
/api/v1/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/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/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/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 Replies

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

Authorization

HTTPBearer
AuthorizationBearer <token>

In: header

Path Parameters

discussion_id*string
Formatuuid

Query Parameters

page?integer

Page number

Default1
Range1 <= value
page_size?integer

Replies per page

Default50
Range1 <= value <= 100

Response Body

application/json

application/json

curl -X GET "https://loading/api/v1/social/discussions/497f6eca-6276-4993-bfeb-53cbbbba6f08/replies"
{
  "discussion_id": "4a1a65c7-bdf0-4314-aad5-d04482b0013c",
  "replies": [
    {
      "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"
    }
  ],
  "total": 0,
  "page": 0,
  "page_size": 0,
  "has_more": true
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

Get Discussion

GET
/api/v1/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/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": {}
    }
  ]
}

List Moderation Reports

GET
/api/v1/social/moderation/reports

Authorization

HTTPBearer
AuthorizationBearer <token>

In: header

Query Parameters

status?|

Filter by status

page?integer

Page number

Default1
Range1 <= value
page_size?integer

Reports per page

Default25
Range1 <= value <= 100

Response Body

application/json

application/json

curl -X GET "https://loading/api/v1/social/moderation/reports"
{
  "reports": [
    {
      "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",
      "report_type": "spam",
      "reason": "string",
      "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",
      "reporter_name": "string",
      "reported_user_name": "string",
      "event_title": "string",
      "event_is_hidden": true
    }
  ],
  "total": 0,
  "page": 0,
  "page_size": 0,
  "has_more": true
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

Review Moderation Report

PATCH
/api/v1/social/moderation/reports/{report_id}

Authorization

HTTPBearer
AuthorizationBearer <token>

In: header

Path Parameters

report_id*string
Formatuuid

Request Body

application/json

status?|
review_notes?|
action_taken?|

Response Body

application/json

application/json

curl -X PATCH "https://loading/api/v1/social/moderation/reports/497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "Content-Type: application/json" \  -d '{}'
{
  "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": {}
    }
  ]
}

Set Event Hidden

PATCH
/api/v1/social/moderation/events/{event_id}/hidden

Authorization

HTTPBearer
AuthorizationBearer <token>

In: header

Path Parameters

event_id*string
Formatuuid

Request Body

application/json

hidden*boolean

Response Body

application/json

application/json

curl -X PATCH "https://loading/api/v1/social/moderation/events/497f6eca-6276-4993-bfeb-53cbbbba6f08/hidden" \  -H "Content-Type: application/json" \  -d '{    "hidden": true  }'
{
  "property1": true,
  "property2": true
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}