https://api.snaptrade.com/api/v1/accounts/{accountId}/trading/instruments/cryptocurrencyPairs/{instrumentSymbol}/quote
Gets a quote for the specified account.
accountId
string (format: uuid)
required
Unique identifier for the connected brokerage account. This is the UUID used to reference the account in SnapTrade.
instrumentSymbol
string
Cryptocurrency pair instrument symbol
userId
SnapTrade User ID. This is chosen by the API partner and can be any string that is a) unique to the user, and b) immutable for the user. It is recommended to NOT use email addresses for this property because they are usually not immutable.
userSecret
SnapTrade User Secret. This is a randomly generated string and should be stored securely. If compromised, please rotate it via the rotate user secret endpoint.
1import { Snaptrade } from "snaptrade-typescript-sdk";2 3const snaptrade = new Snaptrade({4 clientId: "PARTNER_CLIENT_ID",5 consumerKey: "CONSUMER_KEY",6});7 8const response =9 await snaptrade.trading.getCryptocurrencyPairQuote(10 {11 accountId:12 "917c8734-8470-4a3e-a18f-57c3f2ee6631",13 instrumentSymbol: "BTC-USD",14 userId: "snaptrade-user-123",15 userSecret:16 "adf2aa34-8219-40f7-a6b3-60156985cc61",17 },18 );19console.log(response.data);
object
bid
string (format: decimal)
The highest price a buyer is willing to pay.
ask
The lowest price a seller is willing to accept.
mid
The market mid price.
timestamp
string (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}