-
Authentication
-
Setting
-
Profile
-
Administration
-
Crypto Information
-
Request
POST /register
Parameters Data Type Required / Optional Description username string Required length 6-30, no space email string Required your email password string Required length 8-20, must have upper, lower case and digits, no space firstname string Required your first name lastname string Required your last name public string Optional, true by defualt If you willing to share you profile Response
{
"user": {
"email": "your email",
"password": "your password",
"firstname": "your first name",
"lastname": "your last name",
"public": "ture/false",
"administrator": "true/false",
"createAt": "some date",
"upedateAt": "soome date"
},
"token": "xxx"
}
{
"error": "Some error message"
}
-
Request
POST /verify/register
Parameters Data Type Required / Optional Description username string Required length 6-30, no space email string Required your email password string Required length 8-20, must have upper, lower case and digits, no space firstname string Required your first name lastname string Required your last name public string Optional, true by defualt If you willing to share you profile Response
{
"success": "true",
"message": "We sent a link to your email, please check your email and activate your account"
}
{
"error": "Some error message"
}
-
Request
POST /login
Parameters Data Type Required / Optional Description email/email string Required your email or username password string Required your password
{
"user": {
"email": "your email",
"password": "your password",
"firstname": "your first name",
"lastname": "your last name",
"public": "ture/false",
"administrator": "true/false",
"createAt": "some date",
"upedateAt": "soome date"
},
"token": "xxx"
}
{
"error": "Error message showing that why it didn't login successfully"
}
-
Purpose: Set your account to public
Request
GET /user/public
header Data Type Required / Optional Description authorization jwt token Required Your jwt token Response
welcome API
{
"error": "reason why your request failed"
}
-
Purpose: Set your account to private
Request
GET /user/private
header Data Type Required / Optional Description authorization jwt token Required Your jwt token Response
welcome API
{
"error": "reason why your request failed"
}
-
Request
POST /user/setting
header Data Type Required / Optional Description authorization jwt token Required Your jwt token Parameters Data Type Required / Optional Description email string Required your email password string Required your password firstname string Required your first name lastname string Required your last name public string Optional, true by defualt If you willing Response
{
"email": "your email",
"password": "your password",
"firstname": "your first name",
"lastname": "your last name",
"public": "ture/false",
"administrator": "true/false",
"createAt": "some date",
"upedateAt": "soome date"
}
{
"error": "reason why your request failed"
}
-
Request
GET /user/setting
header Data Type Required / Optional Description authorization jwt token Required Your jwt token Response
{
"email": "your email",
"password": "your password",
"firstname": "your first name",
"lastname": "your last name",
"public": "ture/false",
"administrator": "true/false",
"createAt": "some date",
"upedateAt": "soome date"
}
{
"error": "reason why your request failed"
}
-
Request
POST /user/profile
header Data Type Required / Optional Description authorization jwt token Required Your jwt token Parameters Data Type Required / Optional Description email String Optional Your contact email github String Optional Your github account interest String Optional Your interest areas investment String Optional Your current investment Response
{
"email": "your email",
"github": "your github account",
"interest": "your interest areas",
"investment": "req.body.investment",
"createAt": "some date",
"upedateAt": "soome date"
}
{
"error": "reason why your request failed"
}
-
Request
GET /user/profile
header Data Type Required / Optional Description authorization jwt token Required Your jwt token Response
{
"email": "your email",
"github": "your github account",
"interest": "your interest areas",
"investment": "req.body.investment",
"createAt": "some date",
"upedateAt": "soome date"
}
{
"error": "reason why your request failed"
}
-
Request
PUT /user/profile
header Data Type Required / Optional Description authorization jwt token Required Your jwt token Parameters Data Type Required / Optional Description email String Optional Your contact email github String Optional Your github account interest String Optional Your interest areas investment String Optional Your current investment Response
{
"email": "your email",
"github": "your github account",
"interest": "your interest areas",
"investment": "req.body.investment",
"createAt": "some date",
"upedateAt": "soome date"
}
{
"error": "reason why your request failed"
}
-
Request
GET /user/profile/clear
header Data Type Required / Optional Description authorization jwt token Required Your jwt token Response
{
"email": "",
"github": "",
"interest": "",
"investment": "",
"createAt": "some date",
"upedateAt": "soome date"
}
{
"error": "reason why your request failed"
}
- This feature is for setting up adminstrator and website management.
-
Request
POST /adminregister
Parameters Data Type Required / Optional Description email string Optional your email password string Optional your password firstname string Optional your first name lastname string Optional your last name public string Optional If you willing to share you profile Response
{
"user": {
"email": "your email",
"password": "your password",
"firstname": "your first name",
"lastname": "your last name",
"public": "ture/false",
"administrator": "true",
"createAt": "some date",
"upedateAt": "soome date"
},
"token": "xxx"
}
{
"error": "reason why your request failed"
}
-
list all the users in database
Request
GET /administrator/list
header Data Type Required / Optional Description authorization jwt token Required Your jwt token Response
[
{
"email": "your email",
"password": "your password",
"firstname": "your first name",
"lastname": "your last name",
"public": "ture/false",
"administrator": "true",
"createAt": "some date",
"upedateAt": "soome date"
},
{
},
]
{
"error": "error messages"
}
-
-
Request
POST /administrator/sendall
header Data Type Required / Optional Description authorization jwt token Required Your jwt token Parameters Data Type Required / Optional Description subject string Optional subject message string Optional message html string Optional html included in email
-
-
Make a transaction
Request
POST /user/make-transaction
header Data Type Required / Optional Description authorization jwt token Required Your jwt token Parameters Data Type Required / Optional Description sell_type string required Selling coin's type sell_price double required Coin's value in USD sell_amount double required Selling coins amount income_type string required Income type (USD for example) income_price double required Currency's value in USD income_amount double required Income amount Response
[
{
"id": "transaction id",
"sell_type": "BTC",
"sell_price": "6000",
"sell_amount": "2",
"income_type": "USD",
"income_price": "1",
"income_amount": "12000",
"createAt": "some date",
"upedateAt": "soome date",
"portfolioId": "The associate portfolio id",
}
]
{
"error": "error messages"
}
-
Check user's current assets (All the currency type and amount the user recently hold)
Request
GET /user/asset
header Data Type Required / Optional Description authorization jwt token Required Your jwt token Response
[
{
"id": "transaction id",
"type": "BTC",
"amount": "2",
"createAt": "some date",
"upedateAt": "soome date",
"portfolioId": "The associate portfolio id",
},
{
},
]
{
"error": "error messages"
}
-
Get the current list of all cryptocurrencies and the following information about each coin.
Request
GET /user/coinlist
header Data Type Required / Optional Description authorization jwt token Required Your jwt token Response
{
"BTC": {
"Id": "1182",
"Url": "/coins/btc/overview",
"ImageUrl": "/media/19633/btc.png",
"Name": "BTC",
"Symbol": "BTC",
"CoinName": "Bitcoin",
"FullName": "Bitcoin (BTC)",
"Algorithm": "SHA256",
"ProofType": "PoW",
"FullyPremined": "0",
"TotalCoinSupply": "21000000",
"PreMinedValue": "N/A",
"TotalCoinsFreeFloat": "N/A",
"SortOrder": "1",
"Sponsored": false
},
"ETH": {},
}
{
"error": "error messages"
}
Returns all the exchanges that CryptoCompare has integrated with.
Request
GET /user/exchange-list
header | Data Type | Required / Optional | Description |
---|---|---|---|
authorization | jwt token | required | Your jwt token |
Response
{
"Cryptsy":
{
"42":["BTC","XRP"],
"EMC2":["BTC","XRP"],
"POINTS":["BTC"],
"VTC":["BTC","LTC","XRP"]
}
}
{
"error": "error messages"
}
Get the current price of any cryptocurrency in any other currency.
Request
POST /user/price
header | Data Type | Required / Optional | Description |
---|---|---|---|
authorization | jwt token | required | Your jwt token |
Parameters | Data Type | Required / Optional | Description |
---|---|---|---|
fsym | string | required | From symbal |
tsyms | array of strings | required | To Symbol(s) |
Response
{
"USD": 1100.24,
"BTC": 0.16
}
{
"error": "error messages"
}
Works like price, except it allows you to specify a matrix of From Symbols.
Request
POST /user/price-multi
header | Data Type | Required / Optional | Description |
---|---|---|---|
authorization | jwt token | required | Your jwt token |
Parameters | Data Type | Required / Optional | Description |
---|---|---|---|
fsym | array of strings | required | From symbal |
tsyms | array of strings | required | To Symbol(s) |
Response
{
"BTC": {"USD": 6213.54}
}
{
"error": "error messages"
}
Get all the current trading info (price, vol, open, high, low, etc.) of any list of cryptocurrencies in any other currency.
Request
POST /user/price-historical
header | Data Type | Required / Optional | Description |
---|---|---|---|
authorization | jwt token | required | Your jwt token |
Parameters | Data Type | Required / Optional | Description |
---|---|---|---|
fsym | array of strings | required | From symbal |
tsyms | array of strings | required | To Symbol(s) |
Response
{
"BTC": {
"USD": {
"TYPE": "5",
"MARKET": "CCCAGG",
"FROMSYMBOL": "BTC",
"TOSYMBOL": "USD",
"FLAGS": "4",
"PRICE": 1152.42,
"LASTUPDATE": 1487865689,
"LASTVOLUME": 0.21,
"LASTVOLUMETO": 242.20349999999996,
"LASTTRADEID": 1224703,
"VOLUME24HOUR": 53435.45299122338,
"VOLUME24HOURTO": 60671593.843186244,
"OPEN24HOUR": 1119.31,
"HIGH24HOUR": 1170,
"LOW24HOUR": 1086.641,
"LASTMARKET": "itBit",
"CHANGE24HOUR": 33.11000000000013,
"CHANGEPCT24HOUR": 2.958072383879366,
"SUPPLY": 16177825,
"MKTCAP": 18643649086.5
},
"EUR": "..."
},
"ETH": "..."
}
Request
POST /user/price-multi
header | Data Type | Required / Optional | Description |
---|---|---|---|
authorization | jwt token | required | Your jwt token |
Parameters | Data Type | Required / Optional | Description |
---|---|---|---|
fsym | array of strings | required | From symbal |
tsyms | array of strings | required | To Symbol(s) |
Response
{
"BTC": { "USD": 6213.54},
}
{
"error": "error messages"
}
-
-
Every route start with baseURL/user/ will check the token sent by a client, and the server will recognize the token and know which user you are. If you update your email, username or password, the token will expire.
-
Our backend will send a confirmation link when user registers his/her account. The link contains an encrypted parameter which includes user registration information. When the user clicks the link backend verify and decode the parameter using a private key to acquire the user's registration information then create an account accordingly.
-
-
- Administrators can manually send notifications to every user's email. Whereas at every day 8 am users will receive an email containing the latest news about the coin they hold the most.
-
- We are currently using Gmail for sending email, which could cause problems when it comes to sending bulk emails.