Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.vectrade.io/llms.txt

Use this file to discover all available pages before exploring further.

Pagination

List endpoints return paginated results using cursor-based pagination. This approach is stable under concurrent writes and scales to millions of records.

Response Envelope

All list endpoints return a standard envelope:
{
  "data": [ ... ],
  "has_more": true,
  "cursor": "eyJpZCI6MTAwfQ==",
  "total": 1542
}
FieldTypeDescription
dataarrayPage of results
has_morebooleanWhether more pages exist
cursorstringOpaque cursor for the next page (null if last page)
totalnumberTotal result count (may be approximate for large sets)

Using Cursors

Pass the cursor from the previous response to fetch the next page:
from vectrade import VecTrade

client = VecTrade()

# Automatic iteration (recommended)
for article in client.news.list(limit=50):
    print(article.title)
# SDK handles pagination automatically — fetches pages as you iterate

# Manual pagination
page = client.news.list(limit=50)
while True:
    for article in page.data:
        print(article.title)
    if not page.has_more:
        break
    page = client.news.list(limit=50, cursor=page.cursor)

Parameters

ParameterTypeDefaultDescription
limitinteger20Items per page (1–100)
cursorstringCursor from previous response

Collect All Results

# Collect all results into a list
all_articles = list(client.news.list(limit=100))

# Or with async
all_articles = await client.news.list(limit=100).collect()

Paginated Endpoints

EndpointResourceDefault Limit
GET /vq/newsNews articles20
GET /vq/earnings/calendarEarnings dates20
GET /vq/insider/{symbol}/transactionsInsider trades20
GET /vq/analyst/{symbol}/ratingsAnalyst ratings20
GET /vq/webhooksWebhook subscriptions20
GET /vq/developer/keysAPI keys20

Best Practices

  1. Use SDK iterators — Both SDKs handle pagination automatically via for loops
  2. Set appropriate limits — Use limit=100 for bulk processing, smaller values for UI
  3. Don’t store cursors long-term — Cursors may expire after 24 hours
  4. Use filters to reduce pages — Apply server-side filtering instead of client-side
Cursors are opaque — do not parse, modify, or construct them manually. They may change format without notice.