For AI agents: the complete documentation index is available at https://docs.snaptrade.com/llms.txt, and the full documentation text is available at https://docs.snaptrade.com/llms-full.txt. Markdown versions of documentation pages are available by appending .md to the URL path.
View as Markdown
Trading

Get crypto pair quote

get
https://api.snaptrade.com/accounts/{accountId}/trading/instruments/cryptocurrencyPairs/{instrumentSymbol}/quote

Gets a quote for the specified account.

Execute an API Request

Authentication Method

Use commercial authentication when acting on behalf of your application and passing end-user credentials with requests that require them.

Credentials
Path
accountIdstring (format: uuid)required

Unique identifier for the connected brokerage account. This is the UUID used to reference the account in SnapTrade.

instrumentSymbolstringrequired

Cryptocurrency pair instrument symbol

Request
Installation
$
npm install snaptrade-typescript-sdk
1
import {
2
Snaptrade,
3
SnaptradeAuth,
4
} from "snaptrade-typescript-sdk";
5
6
const snaptrade = new Snaptrade({
7
auth: SnaptradeAuth.commercialApiKey({
8
consumerKey: "CONSUMER_KEY",
9
clientId: "CLIENT_ID",
10
}),
11
});
12
13
const response =
14
await snaptrade.trading.getCryptocurrencyPairQuote(
15
{
16
accountId:
17
"917c8734-8470-4a3e-a18f-57c3f2ee6631",
18
instrumentSymbol: "BTC-USD",
19
userId: "USER_ID",
20
userSecret: "USER_SECRET",
21
},
22
);
23
console.log(response.data);

Response fields

object
bidstring (format: decimal)

The highest price a buyer is willing to pay.

askstring (format: decimal)

The lowest price a seller is willing to accept.

midstring (format: decimal)

The market mid price.

timestampstring (format: date-time)

The timestamp of the quote.

1
{
2
"bid": "123.45",
3
"ask": "123.45",
4
"mid": "123.45",
5
"timestamp": "2024-01-24T15:00:00.000Z"
6
}