Skip to content

Latest commit

 

History

History
269 lines (143 loc) · 6.4 KB

DOCS.md

File metadata and controls

269 lines (143 loc) · 6.4 KB

testnet-xchange-backend v0.0.1

Auth

Authenticate

POST /auth

Headers

Name Type Description
Authorization String

Basic authorization with email and password.

Parameters

Name Type Description
access_token String

Master access_token.

Authenticate with Facebook

POST /auth/facebook

Parameters

Name Type Description
access_token String

Facebook user accessToken.

Authenticate with Github

POST /auth/github

Parameters

Name Type Description
access_token String

Github user accessToken.

Authenticate with Google

POST /auth/google

Parameters

Name Type Description
access_token String

Google user accessToken.

Authenticate with Reddit

POST /auth/reddit

Parameters

Name Type Description
state String

Reddit variable passed on login.

code String

Reddit user accessToken.

Deposit

Retrieve deposit

GET /deposit/get-address

Parameters

Name Type Description
access_token String

user access token.

Trade

Send root-level request to Xchange

GET /trade/admin/:method

Parameters

Name Type Description
access_token String

admin access token.

method String

Xchange server method.

... Any

parameters for a method (including uid if needed)

Send general-scope request to Xchange

GET /trade/public/:method

Parameters

Name Type Description
method String

Xchange server method.

... Any

parameters for a method

Send authenticated request to Xchange

GET /trade/user/:method

Parameters

Name Type Description
access_token String

user access token.

method String

Xchange server method.

... Any

parameters for a method (without uid)

User

Create user

POST /users

Parameters

Name Type Description
access_token String

Master access_token.

email String

User's email.

password String

User's password.

name String optional

User's name.

picture String optional

User's picture.

role String optional

User's role.

Delete user

DELETE /users/:id

Parameters

Name Type Description
access_token String

User access_token.

Retrieve current user

GET /users/me

Parameters

Name Type Description
access_token String

User access_token.

Retrieve user

GET /users/:id

Retrieve users

GET /users

Parameters

Name Type Description
access_token String

User access_token.

q String optional

Query to search.

page Number optional

Page number.

limit Number optional

Amount of returned items.

sort String[] optional

Order of returned items.

fields String[] optional

Fields to be returned.

Update password

PUT /users/:id/password

Headers

Name Type Description
Authorization String

Basic authorization with email and password.

Parameters

Name Type Description
password String

User's new password.

Update user

PUT /users/:id

Parameters

Name Type Description
access_token String

User access_token.

name String optional

User's name.

picture String optional

User's picture.