Crypto Excel » Docs_functions
CryptoExcel comes with a powerful set of custom Excel functions (UDFs) that allow you to import real-time and historical crypto data directly into your spreadsheets. These formulas are designed to be flexible, easy to use, and fully compatible with Excel’s native features.
With CryptoExcel functions, you can build anything from a crypto portfolio tracker to live order book dashboards — without writing a single line of code.
CryptoExcel functions are User-Defined Functions (UDFs) written in Python. Unlike traditional VBA UDFs, they leverage modern Python libraries (CCXT, Pandas, xlOil, etc.), giving you access to powerful crypto and data analysis tools inside Excel.
You use CryptoExcel functions just like native Excel formulas:
=st_watch_trades(“binance”,”BTC/USDT”) Or, for better readability and reusability:
A1 = “binance”
A2 = “BTC/USDT”
A3 = st_watch_trades (A1, A2)
Tip: Always use cell references in formulas instead of hardcoding values. This makes your spreadsheet easier to update and maintain.
Note for international users: Depending on your Excel regional settings, you may need to use semicolons (;
) instead of commas (,
) in formulas.
Most CryptoExcel functions have required and optional parameters:
Required parameters: must be provided for the function to work (e.g., exchange, trading pair).
Optional parameters: allow advanced customization (e.g., time precision, filters).
Example with optional parameters:
=st_watch_trades ("binance","BTC/USDT", , , 1)
In this case, the exchange and symbol are required, while the 6th parameter activates millisecond timestamp precision for trades.
CryptoExcel connects to exchanges using two different methods:
HTTP Requests – Best for simple, one-time queries (e.g., fetching your balance). The Add-In sends a request, the exchange replies, and the connection closes.
WebSockets – Keeps the connection open for real-time communication. Ideal for continuous updates like order books or trade history.
Why this matters: Exchanges enforce rate limits. Each HTTP request counts toward your limit, while WebSocket connections are more efficient for live streaming data.
CryptoExcel manages updates with two different timing rules:
Throttle Time
Applies to HTTP requests.
Defines the minimum time between two consecutive queries.
Update Time
Applies to WebSocket streams.
Data arrives continuously, but CryptoExcel only refreshes Excel at specific intervals for performance.
Functions using WebSockets are easy to identify because they include watch
in their names.
Example:
=ST_WATCH_TRADES("binance","BTC/USDT",5)
This will keep your trade history streaming every 5 seconds even if the python running in the background is updated more frequently.
CryptoExcel leverages Excel’s built-in RTD (Real Time Data) engine. By default, Excel limits RTD updates to once every 2 seconds.
You can change the RTD throttle interval if you need faster or slower updates.
Values are set in seconds and support decimals (e.g., 0.5
for half a second).
Keep in mind: once changed, the setting is persistent and will remain even after closing and reopening Excel
CryptoExcel supports the function wizard, also known as the Insert Function dialog box. You can access it by clicking the ‘fx’ button next to the formula bar or by going to the Formulas tab and selecting Insert Function. We use the following group:
Tip: write = st_ in a cell and you will se an handy list with all the CryptoExcel functions