User account endpoints
Get crypto holdings
Obtain assets from the connected investment account. Performs realtime API call to the underlying integration.
POST
/
api
/
v1
/
holdings
/
get
Get crypto holdings
curl --request POST \
--url https://integration-api.meshconnect.com/api/v1/holdings/get \
--header 'Content-Type: application/json' \
--header 'X-Client-Id: <api-key>' \
--header 'X-Client-Secret: <api-key>' \
--data '
{
"authToken": "<string>",
"includeMarketValue": true
}
'import requests
url = "https://integration-api.meshconnect.com/api/v1/holdings/get"
payload = {
"authToken": "<string>",
"includeMarketValue": True
}
headers = {
"X-Client-Secret": "<api-key>",
"X-Client-Id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Client-Secret': '<api-key>',
'X-Client-Id': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({authToken: '<string>', includeMarketValue: true})
};
fetch('https://integration-api.meshconnect.com/api/v1/holdings/get', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://integration-api.meshconnect.com/api/v1/holdings/get",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'authToken' => '<string>',
'includeMarketValue' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Client-Id: <api-key>",
"X-Client-Secret: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://integration-api.meshconnect.com/api/v1/holdings/get"
payload := strings.NewReader("{\n \"authToken\": \"<string>\",\n \"includeMarketValue\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Client-Secret", "<api-key>")
req.Header.Add("X-Client-Id", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://integration-api.meshconnect.com/api/v1/holdings/get")
.header("X-Client-Secret", "<api-key>")
.header("X-Client-Id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"authToken\": \"<string>\",\n \"includeMarketValue\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://integration-api.meshconnect.com/api/v1/holdings/get")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Client-Secret"] = '<api-key>'
request["X-Client-Id"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"authToken\": \"<string>\",\n \"includeMarketValue\": true\n}"
response = http.request(request)
puts response.read_body{
"content": {
"equityPositions": [
{
"symbol": "AAPL",
"amount": 3,
"costBasis": 109
},
{
"symbol": "F",
"amount": 27,
"costBasis": 7.05791
}
],
"cryptocurrencyPositions": [
{
"marketValue": 75.15,
"lastPrice": 0.05,
"symbol": "DOGE",
"amount": 1503,
"costBasis": 0.033
},
{
"symbol": "BTC",
"amount": 3.0001672,
"costBasis": 18000
}
],
"status": "succeeded",
"errorMessage": "",
"displayMessage": "",
"notSupportedEquityPositions": [
{
"symbol": "CUSIP38259P508",
"amount": 1
}
],
"notSupportedCryptocurrencyPositions": [],
"nftPositions": [],
"optionPositions": [],
"type": "robinhood",
"accountId": "5FUVPB0",
"institutionName": "Robinhood",
"accountName": "Margin account"
},
"status": "ok",
"message": "",
"errorHash": "a394c021",
"teamCode": "P4",
"errorType": ""
}Authorizations
Body
application/json
Request containing authentication token
Type of the institution to connect
Supported integrations:
Robinhood
Coinbase
Kraken
CryptoCom
OpenSea
Binance
Gemini
OkCoin
KuCoin
CexIo
BinanceInternational
Bitstamp
GateIo
Okx
BitFlyer
Coinlist
Huobi
Bitfinex
KrakenDirect
BinanceInternationalDirect
BitfinexDirect
Bybit
Paxos
CoinbasePrime
BtcTurkDirect
KuCoinDirect
OkxOAuth
ParibuDirect
RobinhoodConnect
BlockchainCom
BitsoDirect
BinanceOAuth
BybitDirect
ParibuOAuth
BinanceTrDirect
BybitDirectMobile
Sandbox
Uphold
SandboxCoinbase
KrakenOAuth
BluvoKrakenOAuth
SandboxKrakenOAuth
DeFiWallet
Available options:
robinhood, eTrade, alpaca, tdAmeritrade, weBull, stash, interactiveBrokers, public, coinbase, kraken, coinbasePro, cryptoCom, openSea, binanceUs, gemini, cryptocurrencyAddress, cryptocurrencyWallet, okCoin, bittrex, kuCoin, etoro, cexIo, binanceInternational, bitstamp, gateIo, acorns, okx, bitFlyer, coinlist, huobi, bitfinex, deFiWallet, krakenDirect, vanguard, binanceInternationalDirect, bitfinexDirect, bybit, paxos, coinbasePrime, btcTurkDirect, kuCoinDirect, okxOAuth, paribuDirect, robinhoodConnect, blockchainCom, bitsoDirect, binanceConnect, binanceOAuth, revolutConnect, binancePay, bybitDirect, paribuOAuth, payPalConnect, binanceTrDirect, coinbaseRamp, bybitDirectMobile, sandbox, cryptoComPay, bybitEuDirect, uphold, binancePayOnchain, sandboxCoinbase, bybitPay, krakenOAuth, bluvoKrakenOAuth, cashApp, sandboxKrakenOAuth, krakPay, unlimit, alchemyPay, okxPay, bybitPayPsp Response
Holdings obtained
Was this page helpful?
⌘I
Get crypto holdings
curl --request POST \
--url https://integration-api.meshconnect.com/api/v1/holdings/get \
--header 'Content-Type: application/json' \
--header 'X-Client-Id: <api-key>' \
--header 'X-Client-Secret: <api-key>' \
--data '
{
"authToken": "<string>",
"includeMarketValue": true
}
'import requests
url = "https://integration-api.meshconnect.com/api/v1/holdings/get"
payload = {
"authToken": "<string>",
"includeMarketValue": True
}
headers = {
"X-Client-Secret": "<api-key>",
"X-Client-Id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Client-Secret': '<api-key>',
'X-Client-Id': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({authToken: '<string>', includeMarketValue: true})
};
fetch('https://integration-api.meshconnect.com/api/v1/holdings/get', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://integration-api.meshconnect.com/api/v1/holdings/get",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'authToken' => '<string>',
'includeMarketValue' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Client-Id: <api-key>",
"X-Client-Secret: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://integration-api.meshconnect.com/api/v1/holdings/get"
payload := strings.NewReader("{\n \"authToken\": \"<string>\",\n \"includeMarketValue\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Client-Secret", "<api-key>")
req.Header.Add("X-Client-Id", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://integration-api.meshconnect.com/api/v1/holdings/get")
.header("X-Client-Secret", "<api-key>")
.header("X-Client-Id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"authToken\": \"<string>\",\n \"includeMarketValue\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://integration-api.meshconnect.com/api/v1/holdings/get")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Client-Secret"] = '<api-key>'
request["X-Client-Id"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"authToken\": \"<string>\",\n \"includeMarketValue\": true\n}"
response = http.request(request)
puts response.read_body{
"content": {
"equityPositions": [
{
"symbol": "AAPL",
"amount": 3,
"costBasis": 109
},
{
"symbol": "F",
"amount": 27,
"costBasis": 7.05791
}
],
"cryptocurrencyPositions": [
{
"marketValue": 75.15,
"lastPrice": 0.05,
"symbol": "DOGE",
"amount": 1503,
"costBasis": 0.033
},
{
"symbol": "BTC",
"amount": 3.0001672,
"costBasis": 18000
}
],
"status": "succeeded",
"errorMessage": "",
"displayMessage": "",
"notSupportedEquityPositions": [
{
"symbol": "CUSIP38259P508",
"amount": 1
}
],
"notSupportedCryptocurrencyPositions": [],
"nftPositions": [],
"optionPositions": [],
"type": "robinhood",
"accountId": "5FUVPB0",
"institutionName": "Robinhood",
"accountName": "Margin account"
},
"status": "ok",
"message": "",
"errorHash": "a394c021",
"teamCode": "P4",
"errorType": ""
}