Documentation
Learn how to connect your exchange, link your Notion database, and run automated trade syncing.
Table of Contents
1. Notion Workspace Connection
DATAVEIN connects directly to Notion via an Internal Integration Token. This ensures that only you have access to your database. Follow these steps to configure your Notion space:
Create an Internal Integration
Go to the Notion My Integrations dashboard. Click + New Integration. Set the name to "DATAVEIN", select your workspace, and make sure capabilities have Read, Update, and Insert Content checked. Click submit and copy the Internal Integration Token.
Create your Trade Journal Database
Create a new Page in Notion and add a **Database** (table view). Your database columns must match the required names and types below. (Note: DATAVEIN will automatically try to patch and create missing properties on sync, but the database itself must exist):
| Column Name | Notion Property Type |
|---|---|
| Name | Title (default) |
| Direction | Select (LONG, SHORT) |
| Entry Price | Number |
| Exit Price | Number |
| Gross P&L | Number |
| Fees | Number |
| Net P&L | Number |
| Duration | Rich Text |
| Entry Time | Date |
| Exit Time | Date |
| Market | Select (Spot, Futures) |
| Exchange | Select (Binance, BingX) |
| Notes (Optional) | Rich Text (for AI analysis notes) |
Share Database with Integration
Open your Notion Database page. Click the **...** menu in the top-right corner, select **Connections**, find your **DATAVEIN** connection, and click share. This grants the token access to read and write to your table.
Copy Database ID
Copy the database ID from the Notion Page URL. It is the 32-character alphanumeric code in the link between the slash after your workspace name and the question mark (e.g. `https://notion.so/workspace/``32_char_database_id``?v=...`).
2. Exchange API Setup
🔒 SECURITY GUARANTEE: DATAVEIN strictly requires Read-Only API permissions. Trading and withdrawal access MUST be turned off (disabled) on your exchange account. It is physically impossible for the app to place trades or execute withdrawals.
Binance Read-Only Key
- Log in to Binance and visit API Management.
- Create a **System-generated Key**.
- Under Restrictions, make sure **Enable Reading** is checked.
- Verify that **Enable Spot & Margin Trading**, **Enable Futures**, and **Enable Withdrawals** are completely **unchecked**.
- Copy and paste your Key and Secret into the app dashboard.
BingX Read-Only Key
- Log in to BingX and visit API Management.
- Create a new API Key.
- Ensure permission is set to **Read Only**.
- Do **not** check Spot Trading, Perpetual Futures, or Withdrawal permissions.
- Submit, and paste the API Key and Secret into the dashboard.
3. Optional: Groq AI Setup
If you want DATAVEIN to write an automated summary analysis of your trades in the Notion table's `Notes` column, you can configure a free Groq API key:
- Create an account on the Groq Developer Console.
- Go to the **API Keys** section and generate a new key (it starts with `gsk_`).
- Add this key to your server's environment variables as `GROQ_API_KEY=gsk_...` (or put it in your `.env` file).
- Add a **Notes** column (Rich Text type) to your Notion database. The app will detect the column and write AI summaries automatically!
4. Running the Sync Engine
Once your credentials are connected and validated on the dashboard Console panel, syncing is easy: