GithubHelp home page GithubHelp logo

clins1994 / tv-api-ts-example Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 1.0 214 KB

This is a subset of TradingViewAPI (JavaScript) written in TypeScript for specific purposes (login and simple chart data)

License: MIT License

TypeScript 100.00%

tv-api-ts-example's Introduction

Overview

Example in JavaScript

https://github.com/Mathieu2301/TradingView-API/blob/401936ff371fe6281938b7fb2d2e4580c7c7fc3f/examples/SimpleChart.js

Goals of this example

  1. signing into TradingView from express server
  2. getting OHCD data for EURUSD from express server
  3. refactor TradingViewAPI code that does the above to TypeScript

How to run

$ nvm use
$ npm install
$ node index.js

Signing in

  • Method: POST
  • Request JSON Payload
{
  "username": "your-tv-username",
  "password": "your-tv-password"
}
  • Response will be either
    • HTTP 200 with a text message or
    • HTTP 400 with a BAD_REQUEST error
      • Details of the error will be on your console

Screenshot below for reference

I'm using Thunder Client VSCode extension

signin

References

About me / reaching out

If you liked this example and would like me to make others similar to it feel free to reach out

If you sponsor me, your request will get my attention quicker as I check the sponsor dashboard from time to time

On telegram you can find me with the same tag as GitHub: https://t.me/clins777

tv-api-ts-example's People

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

savvibrax

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.