[go: up one dir, main page]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

web-socket #24211

Open
veleg opened this issue Nov 10, 2024 · 1 comment
Open

web-socket #24211

veleg opened this issue Nov 10, 2024 · 1 comment
Assignees
Labels

Comments

@veleg
Copy link
veleg commented Nov 10, 2024

Operating System

w10

Programming Languages

JavaScript

CCXT Version

4.4.28

Description

I receive data via NODE JS.
  const ccxt = require('ccxt');
const mexc = new ccxt.pro.mexc({});
const orderBook = await mexc.watchOrderBook(symb + '/USDT');

Is it possible to connect to a web socket through a browser by connecting a file:
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.4.26/dist/ccxt.browser.min.js"></script>

Code

No response

@sc0Vu
Copy link
Contributor
sc0Vu commented Nov 11, 2024

@veleg Yes, you can use ccxt pro in browser.

eg.

      const symbol = 'BTC/USDT:USDT'
      const exchange = new ccxt.pro.gate({
        proxyUrl: 'xxxxxxxx'
      })
      try {
        const ticker = await exchange.watchTicker(symbol)
      } catch (e) { ... }

@sc0Vu sc0Vu self-assigned this Nov 11, 2024
@sc0Vu sc0Vu added the question label Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants