> ## Documentation Index
> Fetch the complete documentation index at: https://knowledge.cloudquant.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Accessing Data from a Live Trading Environment

> How to use CloudQuant Data Liberator data in live algorithmic trading environments, including data transfer strategies and live streaming.

# Accessing data from a live trading environment

This guide addresses how to use CloudQuant Data Liberator data in live algorithmic trading environments, particularly when third-party APIs cannot be integrated directly.

## Key challenges

Some organizations restrict third-party APIs in live trading systems. When this applies to you, retrieve the data locally and transfer it to the trading server through approved methods.

## Data transfer solutions

### Low frequency approaches

For infrequently updated data, set up shared file storage accessible to both the live trading application and your local servers. Push data to these locations on a schedule, and coordinate with your Operations department to arrange access.

### High frequency solutions

For more frequent intraday updates, messaging services like [ZeroMQ](https://zeromq.org/) are recommended as lightweight alternatives. ZeroMQ operates peer-to-peer without requiring intermediate broker infrastructure.

## Accessing live data from CloudQuant Data Liberator

CloudQuant Data Liberator delivers live datasets with similar simplicity to historical data retrieval. The platform supports seamless transitions between historical and real-time data.

### Example code

```python theme={null}
import liberator

liberator.url = 'https://weather.cloudquant.ai/'

yesterday = '2024-08-01'

res = liberator.query(name = 'us_live_weather', symbols = '78758', as_of = 'live', back_to = yesterday)

for batch in res:
    df = batch.to_pandas()
    print(df)
```

<Note>
  When `back_to` is specified, the query delivers historical data from that point forward, then automatically transitions to live streaming. Omitting `back_to` initiates live data immediately at the vendor's defined frequency.
</Note>
