Crypto Trading

Trade crypto through our API and the Alpaca web dashboard! Trade all day, seven days a week, as frequently as you’d like.

🚧

As of November 18, 2022, cryptocurrency trading is open to select international jurisdiction and some U.S. jurisdictions.

To view the supported US regions for crypto trading, click here.

Supported Coins

Alpaca supports over 20+ unique crypto assets across 56 trading pairs. Current trading pairs are based on BTC, USD, USDT and USDC) with more assets and trading pairs coming soon.

To query all available crypto assets and pairs you can you use the following API call:

curl --request GET 'https://api.alpaca.markets/v2/assets?asset_class=crypto' \
--header 'Apca-Api-Key-Id: <KEY>' \
--header 'Apca-Api-Secret-Key: <SECRET>'

Below is a sample trading pair object composed of two assets, BTC and USD.

{
  "id": "276e2673-764b-4ab6-a611-caf665ca6340",
  "class": "crypto",
  "exchange": "FTXU",
  "symbol": "BTC/USD",
  "name": "BTC/USD pair",
  "status": "active",
  "tradable": true,
  "marginable": false,
  "shortable": false,
  "easy_to_borrow": false,
  "fractionable": true,
  "min_order_size": "0.0001",
  "min_trade_increment": "0.0001",
  "price_increment": "1"
}

Note that symbology for trading pairs has changed from our previous format, where BTC/USD was previously referred to as BTCUSD. Our API has made proper changes to support the legacy convention as well for backwards compatibility.

For further reference see Assets API. add link

Supported Orders

When submitting crypto orders through the Orders API and the Alpaca web dashboard, Market, Limit and Stop Limit orders are supported while the supported time_in_force values are gtc, and ioc. We accept fractional orders as well with either notional or qty provided.

You can submit crypto orders for any supported crypto pair via API, see the below cURL POST request.

curl --request POST 'https://paper-api.alpaca.markets/v2/orders' \
--header 'Apca-Api-Key-Id: <KEY>' \
--header 'Apca-Api-Secret-Key: <SECRET>' \
--header 'Content-Type: application/json' \
--data-raw '{
  "symbol": "BTC/USD",
  "qty": "0.0001",
  "side": "buy",
  "type": "market",
  "time_in_force": "gtc"
}'

The above request submits a market order via API to buy 0.0001 BTC with USD (BTC/USD pair) that is good till end of day.

To learn more see orders and fractional trading.

All cryptocurrency assets are fractionable but the supported decimal points vary depending on the cryptocurrency. See Assets entity for information on fractional precisions per asset.

Note these values could change in the future.

Crypto Market Data

Alpaca provides free limited crypto data and a more advanced unlimited paid plan. To learn more on our paid plan or to subscribe see Alpaca Data.

To request trading pairs data via REST API, see Crypto Pricing Data REST API Reference.

The example below requests latest orderbook data (bid and asks) for the following three crypto trading pairs: BTC/USD, ETH/BTC and ETH/USD.

curl --request GET 'data.alpaca.markets/v1beta2/crypto/latest/orderbooks?symbols=BTC/USD,ETH/BTC,ETH/USD' \
--header 'Apca-Api-Key-Id: <KEY>' \
--header 'Apca-Api-Secret-Key: <SECRET>'
{
    "orderbooks": {
        "BTC/USD": {
            "a": [
                {
                    "p": 23541,
                    "s": 0.6118
                },
                ...
            ],
            "b": [
                {
                    "p": 23535,
                    "s": 0.0084
                },
                ...
            ],
            "t": "2022-07-19T22:12:18.485428736Z"
        },
        "ETH/USD": { ... }
        },
        "ETH/BTC": { ... }
    }
}

Additionally, you can subcribe to real-time crypto data via Websockets. Example below leverages wscat to subscribe to BTC/USD orderbook.

 $ wscat -c wss://stream.data.alpaca.markets/v1beta2/crypto
Connected (press CTRL+C to quit)
< [{"T":"success","msg":"connected"}]
> {"action": "auth", "key": "<KEY>", "secret": "<SECRET>"}
< [{"T":"success","msg":"authenticated"}]
> {"action":"subscribe","orderbooks":["BTC/USD"]}
< [{"T":"subscription","trades":[],"quotes":[],"orderbooks":["BTC/USD"],"bars":[],"updatedBars":[],"dailyBars":[]}]
< [{"T":"o","S":"BTC/USD","t":"2022-07-19T22:18:43.569566208Z","b":[{"p":23475,"s":0.124},{"p":23474,"s":0.2129},{"...

For further reference of real-time crypto pricing data. see Real-time Data Reference section.

Transferring Crypto

Alpaca now offers native on-chain crypto transfers with wallets! If you have crypto trading enabled and reside in an eligible US state or international jurisdiction you can access wallets on the web dashboard via the Crypto Transfers tab.

Alpaca wallets currently support transfers for Bitcoin, Ethereum, and all Ethereum (ERC20) based tokens. To learn more on transferring crypto with Alpaca, see Crypto Wallets FAQs

Crypto Fees

Alpaca stock trading remains commission-free, where crypto trading includes a small fee per trade dependent on volume. A typical exchange consists of buyer and sellers. For example, anytime you place an order to buy crypto on Alpaca, there is someone else on the other side of the trade that is placing a sell order for you to take. What the seller is doing here is providing liquidity for the trade to take place (i.e. another user or a market maker), making it possible for you to buy crypto. A maker is someone who adds liquidity, and the order gets placed in the order book. Taker on the other hand removes the liquidity by placing a market order.

See the below table with volume-tiered fee pricing:

Tier30D Trading Volume (USD)MakerTaker
10 - 100,00015 bps25 bps
2100,000 - 500,00012 bps22 bps
3500,000 - 1,000,00010 bps20 bps
41,000,000 - 10,000,0008 bps18 bps
510,000,000 - 25,000,0005 bps15 bps
625,000,000 - 50,000,0002 bps13 bps
750,000,000 - 100,000,0002 bps12 bps
8100,000,000+0 bps10 bps

The crypto fee will be charged on the credited crypto asset/fiat (what you receive) per trade. Some examples,

  • Buy ETH/BTC, you receive ETH, the fee is denominated in ETH
  • Sell ETH/BTC, you receive BTC, the fee is denominated in BTC
  • Buy ETH/USD, you receive ETH, the fee is denominated in ETH
  • Sell ETH/USD, you receive USD, the fee is denominated in USD

To get the fees incurred from crypto trading you can use Activities API to query activity_type by CFEE or FEE. See below example of CFEE object:

{
    "id": "20220812000000000::53be51ba-46f9-43de-b81f-576f241dc680",
    "activity_type": "CFEE",
    "date": "2022-08-12",
    "net_amount": "0",
    "description": "Coin Pair Transaction Fee (Non USD)",
    "symbol": "ETHUSD",
    "qty": "-0.000195",
    "price": "1884.5",
    "status": "executed"
}

Fees are currently calculated and posted end of day. If you query on same day of trade you might not get results. We will be providing an update for fee posting to be real-time in the near future.

Margin and Short Selling

Cryptocurrencies are non-marginable. This means that you cannot use leverage to buy them and orders are evaluated against non_marginable_buying_power.

Cryptocurrencies are not shortable.

Trading Hours

Crypto trading is offered for 24 hours everyday and your orders will be executed throughout the day.