Back to top

Beacoin API

This documentation contains all API endpoints available.

The intentions of the public API is to offer the possibility for signal traders to integrate their existing systems with our mobile app and offer seemless experience to their users.

There are currently no API libraries done, but we encourage you to take our API to the next level by opensourcing yours! If you have a wrapper you’d like to show off here, please, let us know - support@beaco.in

By using of this API you agree with our Terms and Conditions.

Caution

This API is in active development and we are changing things rapidly. Once we are ready to release a stable version of API we will notify the existing App owners.

Help us

Have you spotted a mistake in our API docs? Help us improve it by letting us know.

General

  • All times provided are in UTC timezone.

  • Names and content can contain emojis as UTF8MB4 🚀

Authentication

Every endpoint available is secured by User Oauth token, except our authentication endpoints, which are secured by Oauth Client key and secret. Note that there are certain permissions required on nested endpoints, details will be specified per each endpoint.

User oauth tokens are to be sent via Authorization Bearer header:

Authorization: Bearer [USER_OAUTH_TOKEN]

Oauth tokens expire after 2 weeks and should be refreshed by a refresh token provided at every authentication endpoint. It is highly encouraged to use a refresh token to obtain a new access token over storing users credentials. Neither Oauth Tokens, nor Oauth Client secrets are intended to be exposed on the client side and shall be always only use directly as a server to server communication.

If you need a long live Oauth token for your specific user, let us know with details about your use case.

In order to request your Oauth Client Key and Secret, please Sign Up and create a new Application under Apps. Oauth Client Key and Secrets are now pending an approval per every use case, generally we will let you know our decision or possibly have some questions within 24 hours.

There is no Sandbox environment, we suggest separating your environments by properly named Apps.

User Authentication flow

Our user authentication flow respects the traditional grant type Authorization Code.

This section is currently in progress to be properly documented.

User

Endpoints to manage current user’s account.

Get current user

Get current user
GET/users/me

Get current user info.

Example URI

GET https://api.beaco.in/users/me
Request
HideShow
Headers
Content-Type: application/json
Authorization: Bearer [USER_OAUTH_TOKEN]
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "email": "johh@smith.com",
  "first_name": "John",
  "last_name": "Smith",
  "phone_country_code": "1",
  "phone_number": "415112233",
  "avatar": "https://cdn.con/avatar.png"
}

Update current user

Update current user
PUT/users/me

Replaces current user info.

  • avatar cannot be updated by providing image URL

  • phone_country_code is set to NULL in case phone_number is not provided

Example URI

PUT https://api.beaco.in/users/me
Request
HideShow
Headers
Content-Type: application/json
Authorization: Bearer [USER_OAUTH_TOKEN]
Body
{
  "email": "john@smith.com",
  "first_name": "John",
  "last_name": "Smith",
  "phone_country_code": "1",
  "phone_number": "415112233"
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "email": "john@smith.com",
  "first_name": "John",
  "last_name": "Smith",
  "phone_country_code": "1",
  "phone_number": "415112233",
  "avatar": "https://cdn.con/avatar.png"
}

Change current users password

Change current users password
PUT/users/me/password

Changes current user password. Doesn’t dump current tokens, doesn’t force logout of the user and doesn’t cancel currently opened sessions.

  • password has to be at least 8 characters long

Example URI

PUT https://api.beaco.in/users/me/password
Request
HideShow
Headers
Content-Type: application/json
Authorization: Bearer [USER_OAUTH_TOKEN]
Body
{
  "password": "newpassword"
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "ok"
}

Update user avatar

Update user avatar
PUT/users/me/avatar

Avatar is sent as a part of a formdata under a field called file as a binary. If user has an avatar, it gets deleted first before replacing.

Example URI

PUT https://api.beaco.in/users/me/avatar
Request
HideShow
Headers
Content-Type: multipart/form-data
Authorization: Bearer [USER_OAUTH_TOKEN]
Accept: application/json
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "url": "https://cdn.com/user_avatar.png"
}

Channels

Get current users channels

Get current users channels
GET/users/me/channels

Results are sorted by last channel activity - latest active channel will be the first in the array.

Example URI

GET https://api.beaco.in/users/me/channels
Request
HideShow
Headers
Content-Type: application/json
Authorization: Bearer [USER_OAUTH_TOKEN]
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "id": 1,
    "name": "my-new-channel",
    "display_name": "My New Channel",
    "description": "My super cool channel",
    "created_at": "2018-01-02T22:22:12.000Z",
    "updated_at": "2018-01-14T15:56:46.000Z",
    "last_active_at": "2018-01-14T15:56:46.000Z",
    "icon": "https://cdn.com/channel_icon.png",
    "user_count": 3,
    "signal_count": 30,
    "is_member": true,
    "is_admin": false,
    "is_owner": true,
    "owner": {
      "id": 1,
      "avatar": "https://cdn.con/john_smith_avatar.png",
      "display_name": "John Smith"
    }
  }
]

Create a channel

Create a channel
POST/channels

Creating a channel will automatically add the creator as an admin of that channel.

  • color is not being actively used at this point, but we are planning to add the possibilies of an appearance customization. Defaults to system color.

  • is_free it will be possible to search for free channels with free signals that even a non-members will be able to see including signals and news. Defaults to false.

Example URI

POST https://api.beaco.in/channels
Request
HideShow
Headers
Content-Type: application/json
Authorization: Bearer [USER_OAUTH_TOKEN]
Body
{
  "display_name": "My New Channel",
  "color": "#000000",
  "description": "Do you like my new channel?",
  "www": "https://personalwebsite.com",
  "facebook": "https://www.facebook.com/cryptochannel",
  "twitter": "https://www.twitter.com/cryptochannel",
  "is_free": false
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "id": 3,
  "name": "my-new-channel",
  "display_name": "My New Channel",
  "icon": "https://cdn.com/channel_icon.png",
  "description": "Do you like my new channel?",
  "www": "https://personalwebsite.com",
  "facebook": "https://www.facebook.com/cryptochannel",
  "twitter": "https://www.twitter.com/cryptochannel",
  "is_free": false,
  "color": "#000000",
  "created_at": "2018-01-16T16:16:11.119Z",
  "updated_at": "2018-01-16T16:16:11.119Z",
  "last_active_at": "2018-01-16T16:16:11.119Z"
}

Update a channel

Update a channel
PUT/channels/

Attributes not specified will be nulled.

  • color is not being actively used at this point, but we are planning to add the possibilies of an appearance customization. Defaults to system color.

  • is_free it will be possible to search for free channels with free signals that even a non-members will be able to see including signals and news. Defaults to false.

Example URI

PUT https://api.beaco.in/channels/
Request
HideShow
Headers
Content-Type: application/json
Authorization: Bearer [USER_OAUTH_TOKEN]
Body
{
  "display_name": "My New Channel",
  "color": "#000000",
  "description": "Do you like my new channel?",
  "www": "https://personalwebsite.com",
  "facebook": "https://www.facebook.com/cryptochannel",
  "twitter": "https://www.twitter.com/cryptochannel",
  "is_free": false
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "id": 3,
  "name": "my-new-channel",
  "display_name": "My New Channel",
  "icon": "https://cdn.com/channel_icon.png",
  "description": "Do you like my new channel?",
  "www": "https://personalwebsite.com",
  "facebook": "https://www.facebook.com/cryptochannel",
  "twitter": "https://www.twitter.com/cryptochannel",
  "color": "#000000",
  "is_free": false,
  "created_at": "2018-01-16T16:16:11.119Z",
  "updated_at": "2018-01-16T16:16:11.119Z",
  "last_active_at": "2018-01-16T16:16:11.119Z"
}

Get a channel

Get a channel
GET/channels/{id}

Gets details of a specific channel. Currently needs to be channels member or admin to see details.

Example URI

GET https://api.beaco.in/channels/id
URI Parameters
HideShow
id
number (required) 

Channel ID

Request
HideShow
Headers
Content-Type: application/json
Authorization: Bearer [USER_OAUTH_TOKEN]
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "id": 3,
  "name": "my-new-channel",
  "display_name": "My New Channel",
  "icon": "https://cdn.com/channel_icon.png",
  "description": "Do you like my new channel?",
  "www": "https://personalwebsite.com",
  "facebook": "https://www.facebook.com/cryptochannel",
  "twitter": "https://www.twitter.com/cryptochannel",
  "created_at": "2018-01-16T16:16:11.119Z",
  "updated_at": "2018-01-16T16:16:11.119Z",
  "user_count": 1,
  "signal_count": 0,
  "is_free": false,
  "is_member": false,
  "is_admin": false,
  "is_owner": true,
  "owner": {
    "id": 1,
    "avatar": "https://cdn.com/user_avatar.png",
    "display_name": "John Smith"
  },
  "color": "#000000"
}

Update channel icon

Update channel icon
PUT/channels/{id}/icon

Icon is sent as a part of a formdata under a field called file as a binary. If channel already has an icon, it gets deleted first before replacing. User must be an admin of the channel.

Example URI

PUT https://api.beaco.in/channels/id/icon
URI Parameters
HideShow
id
number (required) 

Channel ID

Request
HideShow
Headers
Content-Type: multipart/form-data
Authorization: Bearer [USER_OAUTH_TOKEN]
Accept: application/json
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "url": "https://cdn.com/user_avatar.png"
}

Channel users

Invite new user

Invite new user
POST/channels/{id}/users

Possible only if current user is an admin. User then gets an invitation email where he/she can accept the invitation. Upon clicking on the Accept link from mobile, user is either taken to the mobile App (if already installed) or the respective platform store to download it.

  • user_type - M stands for Member, A stands for Admin

Example URI

POST https://api.beaco.in/channels/id/users
URI Parameters
HideShow
id
number (required) 

Channel ID

Request
HideShow
Headers
Content-Type: application/json
Authorization: Bearer [USER_OAUTH_TOKEN]
Accept: application/json
Body
{
  "email": "john@smith.com",
  "user_type": "M"
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "ok"
}

Get channel users

Get channel users
GET/channels/{id}/users

Gets all members of a channel. Must be an admin of the channel.

  • user_type - M stands for Member, A stands for Admin

Example URI

GET https://api.beaco.in/channels/id/users
URI Parameters
HideShow
id
number (required) 

Channel ID

Request
HideShow
Headers
Content-Type: application/json
Authorization: Bearer [USER_OAUTH_TOKEN]
Accept: application/json
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "user_type": "M",
    "user_id": 1,
    "email": "john@smith.com",
    "avatar": "https://cdn.com/default_avatar.png",
    "display_name": "John Smith"
  },
  {
    "user_type": "A",
    "user_id": 2,
    "email": "juan@carlos.com",
    "avatar": "https://cdn.com/juan_avatar.png",
    "display_name": "Juan Carlos"
  }
]

Get channel invitees

Get channel invitees
GET/channels/{id}/invitees

Gets all users that are invited to

Example URI

GET https://api.beaco.in/channels/id/invitees
URI Parameters
HideShow
id
number (required) 

Channel ID

Request
HideShow
Headers
Content-Type: application/json
Authorization: Bearer [USER_OAUTH_TOKEN]
Accept: application/json
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "user_type": "A",
    "token": "1231232rjkgsdlkglkjg",
    "email": "john@smith.com",
    "created_at": "2018-01-10T12:06:57.000Z",
    "expires_at": "2018-01-12T12:06:57.000Z"
  }
]

Delete channel invitation

Delete channel invitation
DELETE/channels/{id}/invitees/{token}

User must be a channel admin.

Example URI

DELETE https://api.beaco.in/channels/id/invitees/token
URI Parameters
HideShow
id
number (required) 

Channel ID

token
number (required) 

Invitation Token

Request
HideShow
Headers
Content-Type: application/json
Authorization: Bearer [USER_OAUTH_TOKEN]
Accept: application/json
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "email": "john@doe.com",
  "token": "sometokenforinvitation",
  "created_at": "2018-02-26T01:30:37.000Z",
  "expires_at": "2018-05-14T05:54:48.424Z",
  "channel_id": 1,
  "user_type": "M"
}

Get current user channel preferences

Get current user channel preferences
GET/channels/{id}/users/me

Gets current user channel preferences.

  • user_type - M stands for Member, A stands for Admin

Example URI

GET https://api.beaco.in/channels/id/users/me
URI Parameters
HideShow
id
number (required) 

Channel ID

Request
HideShow
Headers
Content-Type: application/json
Authorization: Bearer [USER_OAUTH_TOKEN]
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "user_type": "M",
  "is_opt_in_email": false,
  "is_opt_in_sms": false,
  "is_opt_in_push": false,
  "user_id": 3,
  "avatar": "https://cdn.com/juan_avatar.png",
  "display_name": "Anonymous"
}

Update user channel settings

Update user channel settings
PUT/channels/{id}/users/{user_id}

If user_id is current users ID, the request/response is the first one, else if current user is Admin, its the second request/response pair

  • user_type - M stands for Member, A stands for Admin

Example URI

PUT https://api.beaco.in/channels/id/users/user_id
URI Parameters
HideShow
id
number (required) 

Channel ID

user_id
number (required) 

Users ID.

Request
HideShow
Headers
Content-Type: application/json
Authorization: Bearer [USER_OAUTH_TOKEN]
Accept: application/json
Body
{
  "is_opt_in_email": false,
  "is_opt_in_sms": false,
  "is_opt_in_push": false
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "ok"
}
Request
HideShow
Headers
Content-Type: application/json
Authorization: Bearer [USER_OAUTH_TOKEN]
Accept: application/json
Body
{
  "user_type": "M"
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "ok"
}

Delete channel user

Delete channel user
DELETE/channels/{id}/users/{user_id}

Possible only if current user is an admin.

Example URI

DELETE https://api.beaco.in/channels/id/users/user_id
URI Parameters
HideShow
id
number (required) 

Channel ID

user_id
number (required) 

ID of the user to delete.

Request
HideShow
Headers
Content-Type: application/json
Authorization: Bearer [USER_OAUTH_TOKEN]
Accept: application/json
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "ok"
}

Signals

Get all opened signals for channel

Get all opened signals for channel
GET/channels/{id}/signals

Possible only if current user is an admin or a member of the channel.

Example URI

GET https://api.beaco.in/channels/id/signals
URI Parameters
HideShow
id
number (required) 

Channel ID

Request
HideShow
Headers
Content-Type: application/json
Authorization: Bearer [USER_OAUTH_TOKEN]
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "id": 1,
    "type_code": "B",
    "channel_id": 1,
    "from": "XLM",
    "to": "BTC",
    "reaction_time": 10,
    "hold_time_from": 1,
    "hold_time_to": 7,
    "status_code": "O",
    "created_at": "2018-01-10T12:06:57.000Z",
    "updated_at": "2018-01-10T12:06:57.000Z",
    "closed_at": null,
    "exchange_name": "bittrex",
    "open_price": 0.00000123,
    "close_price": null,
    "note_count": 3,
    "follower_count": 1
  }
]

Post a new signal

Post a new signal
POST/channels/{id}/signals

Possible only if current user is an admin. All channel members and admins opted in updates will receive push/email/sms based on their preference

  • type_code - B = Buy, S = Sell

  • exchange_name - currently only bittrex

  • note - (optional) if note is specified, signal will have automatically a note associated to it in the push/email/sms and visible on signal

Example URI

POST https://api.beaco.in/channels/id/signals
URI Parameters
HideShow
id
number (required) 

Channel ID

Request
HideShow
Headers
Content-Type: application/json
Authorization: Bearer [USER_OAUTH_TOKEN]
Body
{
  "type_code": "B",
  "from": "GAME",
  "to": "BTC",
  "exchange_name": "bittrex",
  "reaction_time": 240,
  "hold_time_from": 1,
  "hold_time_to": 7,
  "note": "this is my special note"
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "id": 32,
  "type_code": "B",
  "channel_id": 1,
  "from": "GAME",
  "to": "BTC",
  "reaction_time": 240,
  "hold_time_from": 1,
  "hold_time_to": 7,
  "status_code": "O",
  "created_at": "2018-01-16T20:32:16.722Z",
  "updated_at": "2018-01-16T20:32:16.722Z",
  "exchange_name": "bittrex",
  "open_price": 0.00001234,
  "close_price": null,
  "note_count": 1,
  "follower_count": 1
}

Get signal details

Get signal details
GET/channels/{id}/signals/{signal_id}

Possible only if current user is an admin or a member of the channel.

Example URI

GET https://api.beaco.in/channels/id/signals/signal_id
URI Parameters
HideShow
id
number (required) 

Channel ID

signal_id
number (required) 

ID of the existing signal

Request
HideShow
Headers
Content-Type: application/json
Authorization: Bearer [USER_OAUTH_TOKEN]
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "id": 1,
  "type_code": "B",
  "channel_id": 1,
  "from": "XLM",
  "to": "BTC",
  "reaction_time": 10,
  "hold_time_from": 1,
  "hold_time_to": 7,
  "status_code": "O",
  "created_at": "2018-01-10T12:06:57.000Z",
  "updated_at": "2018-01-10T12:06:57.000Z",
  "closed_at": null,
  "exchange_name": "bittrex",
  "open_price": 0.00000123,
  "close_price": null,
  "note_count": 3,
  "follower_count": 1
}

Close a signal

Close a signal
DELETE/channels/{id}/signals/{signal_id}

Possible only if current user is an admin of the channel. Signal is marked as closed, close price is calculated based on the current market and signal is no longer shown as default.

Example URI

DELETE https://api.beaco.in/channels/id/signals/signal_id
URI Parameters
HideShow
id
number (required) 

Channel ID

signal_id
number (required) 

ID of the existing signal

Request
HideShow
Headers
Content-Type: application/json
Authorization: Bearer [USER_OAUTH_TOKEN]
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "ok"
}

Signal Notes

Get all notes for a signal

Get all notes for a signal
GET/channels/{id}/signals/{signal_id}/notes

Possible only if current user is an admin or a member of the channel. Notes are sorted descending based on their created_at time.

  • type_code - B = Buy, S = Sell

  • status_code - O = Opened, C = Closed

  • reaction_time - reaction time in minutes

  • hold_time_from, hold_time_to - hold time range in days

Example URI

GET https://api.beaco.in/channels/id/signals/signal_id/notes
URI Parameters
HideShow
id
number (required) 

Channel ID

signal_id
number (required) 

ID of the existing signal

Request
HideShow
Headers
Content-Type: application/json
Authorization: Bearer [USER_OAUTH_TOKEN]
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "id": 7,
    "content": "This is a brand new node 😃",
    "created_at": "2018-01-10T16:27:23.000Z",
    "user": {
      "id": 2,
      "display_name": "Honza Babarik",
      "avatar": "https://cdn.com/user_avatar.png"
    }
  }
]

Post new note to a signal

Post new note to a signal
POST/channels/{id}/signals/{signal_id}/notes

Possible only if current user is an admin of the channel. All signal followers will get notified about this immediately based on their push/sms/email settings.

Example URI

POST https://api.beaco.in/channels/id/signals/signal_id/notes
URI Parameters
HideShow
id
number (required) 

Channel ID

signal_id
number (required) 

ID of the existing signal

Request
HideShow
Headers
Content-Type: application/json
Authorization: Bearer [USER_OAUTH_TOKEN]
Body
{
  "content": "This coin goes to the moon 🚀"
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "ok"
}

News

Get all news in channel

Get all news in channel
GET/channels/{id}/news

Possible only if current user is an admin or a member of the channel. News are sorted descending based on their created_at time.

Example URI

GET https://api.beaco.in/channels/id/news
URI Parameters
HideShow
id
number (required) 

Channel ID

Request
HideShow
Headers
Content-Type: application/json
Authorization: Bearer [USER_OAUTH_TOKEN]
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "id": 2,
    "content": "Latest channel news right here",
    "created_at": "2018-01-10T13:42:59.000Z",
    "updated_at": "2018-01-10T13:42:59.000Z",
    "user": {
      "id": 2,
      "display_name": "Honza Babarik",
      "avatar": "https://cdn.com/user_avatar.png"
    }
  }
]

Get detail news

Get detail news
GET/channels/{id}/news/{news_id}

Possible only if current user is an admin or a member of the channel.

Example URI

GET https://api.beaco.in/channels/id/news/news_id
URI Parameters
HideShow
id
number (required) 

Channel ID

news_id
number (required) 

News ID

Request
HideShow
Headers
Content-Type: application/json
Authorization: Bearer [USER_OAUTH_TOKEN]
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "id": 2,
  "content": "Latest channel news right here",
  "created_at": "2018-01-10T13:42:59.000Z",
  "updated_at": "2018-01-10T13:42:59.000Z",
  "user": {
    "id": 2,
    "display_name": "Honza Babarik",
    "avatar": "https://cdn.com/user_avatar.png"
  }
}

Post new news to a channel

Post new news to a channel
POST/channels/{id}/news

Possible only if current user is an admin of the channel. All channel members will get notified about this immediately based on their push/sms/email settings.

Example URI

POST https://api.beaco.in/channels/id/news
URI Parameters
HideShow
id
number (required) 

Channel ID

Request
HideShow
Headers
Content-Type: application/json
Authorization: Bearer [USER_OAUTH_TOKEN]
Body
{
  "content": "This coin goes to the moon 🚀"
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "ok"
}

Delete news in channel

Delete news in channel
DELETE/channels/{id}/news/{news_id}

Possible only if current user is an admin of the channel. All channel members will get notified about this immediately based on their push/sms/email settings.

Example URI

DELETE https://api.beaco.in/channels/id/news/news_id
URI Parameters
HideShow
id
number (required) 

Channel ID

news_id
number (required) 

News ID

Request
HideShow
Headers
Content-Type: application/json
Authorization: Bearer [USER_OAUTH_TOKEN]
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "ok"
}

Update existing news

Update existing news
POST/channels/{id}/news/{news_id}

Possible only if current user is an admin of the channel.

Example URI

POST https://api.beaco.in/channels/id/news/news_id
URI Parameters
HideShow
id
number (required) 

Channel ID

news_id
number (required) 

News ID

Request
HideShow
Headers
Content-Type: application/json
Authorization: Bearer [USER_OAUTH_TOKEN]
Body
{
  "content": "This coin goes to the moon again! 🚀"
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "ok"
}

Generated by aglio on 21 Sep 2019