8000 GitHub - discountry/tradingview-okx: tradingview charting library example with okx API & Next.js v13
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

discountry/tradingview-okx

Repository files navigation

Tradingview OKX example

This is an example of how to use the Tradingview Charting Library with Next.js and OKX API.

Live Preview

Show case example:

Dependencies

Project Structure

├── components
│   ├── TVChartContainer
│   │   ├── index.tsx
│   │   └── index.module.css
├── pages
│   ├── api
│   │   └── okx-api.ts
│   ├── _app.tsx
│   ├── _document.tsx
│   ├── index.module.css
│   └── index.tsx
├── services
│   ├── okx
│   │   ├── datafeed.ts
│   │   └── streaming.ts
│   └── index.ts
├── styles
│   ├── global.css
│   └── index.ts

Getting Started

  1. Check that you can view https://github.com/tradingview/charting_library/. If you do not have access then you can request access to this repository here.
  2. Copy the charting library files
    1. If you are able to run bash scripts then the copy_charting_library_files.sh script can be used to copy the current stable version's files.
    2. If you are not able to run bash scripts then do the following:
      1. Copy charting_library folder from https://github.com/tradingview/charting_library/ to /public/static folders.
      2. Copy datafeeds folder from https://github.com/tradingview/charting_library/ to /public/static.

Then, run the development server:

npm install
npm run dev
# or
yarn
yarn dev
# or
pnpm install
pnpm dev

Open http://localhost:3000 with your browser to see the result.

You can start editing the page by modifying pages/index.tsx. The page auto-updates as you edit the file.

API routes can be accessed on http://localhost:3000/api/hello. This endpoint can be edited in pages/api/hello.ts.

The pages/api directory is mapped to /api/*. Files in this directory are treated as API routes instead of React pages.

This project uses next/fo 6E9E nt to automatically optimize and load Inter, a custom Google Font.

Learn More

To learn more about Next.js, take a look at the following resources:

You can check out the Next.js GitHub repository - your feedback and contributions are welcome!

Deploy on Vercel

The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.

Check out our Next.js deployment documentation for more details.

Deploy with Vercel

About

tradingview charting library example with okx API & Next.js v13

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0