Skip to content
This repository has been archived by the owner on Jun 13, 2024. It is now read-only.

Commit

Permalink
Add docs for symbol search
Browse files Browse the repository at this point in the history
  • Loading branch information
brian-the-dev committed Oct 5, 2022
1 parent 8fbc101 commit c4c2216
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions docs/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,27 @@ Parameters:
# Example
{'BINANCE:DEXEUSDT': None, 'BINANCE:BTCUSDT': <tradingview_ta.main.Analysis object at 0x7f3561cdeb20>}
Symbol search
-------------
.. versionadded:: 3.3.0

Search for symbols using the TradingView symbol search API. Returns a list of symbols, exchanges, types, descriptions, and logo URLs matching the search query.

.. code-block:: python3
from tradingview_ta import TradingView
print(TradingView.search("tesla", "america"))
# Output: [{'symbol': 'TSLA', 'exchange': 'NASDAQ', 'type': 'stock', 'description': 'Tesla, Inc.', 'logo': 'https://s3-symbol-logo.tradingview.com/tesla.svg'}, ...]
.. note::

While symbols listed on https://tvdb.brianthe.dev are guaranteed to work with the "get analysis()" function, symbols returned by this function may not.

Parameters:

* text (``str``) – Query string.
* type (``str``, optional) – Type of asset (stock, crypto, futures, index). Defaults to None (all).

Proxy
-----
Simply add the ``proxies`` parameter if you wish to utilize a proxy. It's worth noting that a bad proxy could result in TradingView rejecting your request.
Expand Down

0 comments on commit c4c2216

Please sign in to comment.