diff --git a/README.md b/README.md index 7d519d7..7b8682d 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ A TypeScript SDK for the https://alpaca.markets REST API and WebSocket streams. - [Usage](#getting-started) - [Create a Client](#create-a-client) - [Configuration](#configuration) - - [Base URLs](#base-urls) + - [Environment Variables](#environment-variables) - [Rate Limiting](#rate-limiting) - [Methods](#methods) - [Trading API](#trading-api) @@ -77,12 +77,20 @@ const client = createClient({ }); ``` -You can also use the `ALPACA_KEY` and `ALPACA_SECRET` environment variables to set your API key and secret. The client will automatically use these values if they are set. They will not override any credentials explicitly passed to `createClient`. - -> Note: By default, the client will make requests to the paper trading environment (`https://paper-api.alpaca.markets`). This is a safety measure to prevent accidental trades. +By default, the client will make requests to the paper trading environment (`https://paper-api.alpaca.markets`). This is a safety measure to prevent accidental trades. ### Configuration +#### Environment Variables + +You can set the following environment variables to configure the client: + +- `APCA_KEY_ID`: Your API key. +- `APCA_KEY_SECRET`: Your API secret. +- `APCA_ACCESS_TOKEN`: Your access token (if using OAuth). + +The client will automatically use these values if they are set. They will not override any credentials explicitly passed to `createClient`. + #### Rate Limiting You can customize the rate limiting by passing a `tokenBucket` object to the `createClient` function. This object should contain the `capacity` and `fillRate` for the rate limiter.