TTB API

Backend API for WebApp The Tactical Brief

Optionflow-etf 1

Optionflow ETF data fetch functionalities

Description

Get optionflow-etf data by ETF code, authentication needed and authorized for subscriber and admin (for testing phase)

Headers
KeyValueDescription
AuthorizationBearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVlYmI2YTczMmExMmJjNDM4ODczOWMyZCIsImlhdCI6MTU4OTM0NjY4NywiZXhwIjoxNTg5MzUwMjg3fQ.3hkpDfuDE9JsJFd8lki7x8970SRqP5GBfe99MegCluc

Authentication 8

Routes for user authentication including register, login, reset password, logout etc.

Description

Add new user to database - by unique email - default role ‘user’ - including password encryption - including send email to confirm registration (disabled for testing phase)

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "name": "Tim", "email": "tim@gmail.com", "password": "123456" }
Description

Resend email to user with link to verify registration and activate account

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "email": "tim@gmail.com" }
Description

Login user with email and password including a comparison of entered and stored hashed password

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "email": "freeloader@gmail.com", "password": "123456" }
Description

Identify currently logged in user by bearer token sent with headers

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

AuthorizationBearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVlYmI2YTczMmExMmJjNDM4ODczOWMyZCIsImlhdCI6MTU4OTM0NjY4NywiZXhwIjoxNTg5MzUwMjg3fQ.3hkpDfuDE9JsJFd8lki7x8970SRqP5GBfe99MegCluc
Description

Logout user and invalidate token

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

AuthorizationBearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVlYmI2YTczMmExMmJjNDM4ODczOWMyZCIsImlhdCI6MTU4OTM0NjY4NywiZXhwIjoxNTg5MzUwMjg3fQ.3hkpDfuDE9JsJFd8lki7x8970SRqP5GBfe99MegCluc
Description

Generate reset password token and send reset link by email via smtp server

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "email": "tim@gmail.com" }
Description

Reset user password using token sent by email

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "password": "1234567" }

Users 3

Update and delete functionalities for users

Description

Delete user by id (private: must be authenticated)

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Description

Update user information name, email, role by user id

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "name": "trader1", "email": "trader1@gmail.com" }
Description

Update password of user identified by id (protected: authentication needed)

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "password": "!123456p", "newPassword": "123456" }

COT 3

GET methods to receive COT data for futures, oscillators and overview

Description

Get COT future data by futureCode (public)

Description

Get COT report data (including oscillator and netto data) by futureCode (public)