|
<< Click to Display Table of Contents >> Navigation: 3. Script Language > Internet and Network > MCP. - MCP (Model-Context Protocol) server operations > KRAKEN API - Cryptocurrency Trading > KRAKEN.GetPrice - Get Pair Price |
Retrieves current ticker information for a trading pair. Returns JSON with price, volume, and other market data.
Syntax:
KRAKEN.GetPrice|$$PAIR|$$RET_VAR
Parameters:
$$PAIR (String, required) - Trading pair (e.g., XXBTZUSD, XETHZUSD).
$$RET_VAR (Variable, required) - Variable to receive JSON response.
Example:
KRAKEN.GetPrice|XXBTZUSD|ticker
; Parse the JSON to get last trade price
PSJ.Parse|ticker|tickerObj
PSJ.GetValue|tickerObj|result.XXBTZUSD.c[0]|lastPrice
Common Pairs:
XXBTZUSD - Bitcoin / US DollarXETHZUSD - Ethereum / US DollarXXBTZEUR - Bitcoin / EuroXETHXXBT - Ethereum / Bitcoin