POST
/
api
/
v1
/
transactions
/
preview
/
{side}
curl --request POST \
  --url https://integration-api.meshconnect.com/api/v1/transactions/preview/{side} \
  --header 'Content-Type: application/json' \
  --header 'X-Client-Id: <api-key>' \
  --header 'X-Client-Secret: <api-key>' \
  --data '{
  "symbol": "ETH",
  "paymentSymbol": "USD",
  "amount": 1,
  "price": 1200,
  "isCryptocurrency": true,
  "paymentIsCryptocurrency": false,
  "amountIsFiat": false,
  "amountIsInPaymentSymbol": false,
  "extendedHours": false,
  "orderType": "limit",
  "timeInForce": "goodForDay",
  "authToken": "Secret authentication token",
  "type": "robinhood"
}'

Authorizations

X-Client-Secret
string
headerrequired

Contact Mesh to get client Secret

X-Client-Id
string
headerrequired

Contact Mesh to get client Id

Path Parameters

side
enum<string>
required
Available options:
unknown,
buy,
sell

Body

application/json
authToken
string
required

Auth token that allows connecting to the target institution

Minimum length: 1
type
enum<string>
required

Type of the institution to connect

Supported integrations:

Robinhood ETrade Alpaca WeBull Stash InteractiveBrokers Public Coinbase Kraken CoinbasePro CryptoCom Binance Gemini OkCoin KuCoin Etoro CexIo BinanceInternational Bitstamp GateIo Okx BitFlyer Coinlist Huobi Bitfinex KrakenDirect Vanguard BinanceInternationalDirect Bybit CoinbasePrime RobinhoodConnect

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
symbol
string
required

Symbol to trade. For example, AAPL or ETH

Minimum length: 1
paymentSymbol
string
required

Symbol to use for payment, defaults to USD.

Minimum length: 1
amount
number
required

Amount of purchase.

isCryptocurrency
boolean
required

Some Stock and Crypto symbols can intersect, so the type of the asset needs to be specified explicitly.

paymentIsCryptocurrency
boolean
required

Indicates whether the PaymentSymbol is fiat or cryptocurrency

amountIsInPaymentSymbol
boolean
required

This value indicates if the order should be executed in payment/quote currency amount (e.g. purchase ETH for $10). This can be performed only if the current institution supports such orders (SupportsPlacingSellOrdersInPaymentSymbolAmount and SupportsPlacingBuyOrdersInPaymentSymbolAmount fields in get supported order features for institution) and AmountInPaymentSymbol value is passed.

orderType
enum<string>
required
Available options:
market,
limit,
stopLoss
timeInForce
enum<string>
required
Available options:
goodTillCanceled,
immediateOrCancel,
fillOrKill,
goodForDay,
postOnly,
unknown
price
number

Price of the unit, used for Limit and StopLoss orders.

amountIsFiat
boolean | null
deprecated
amountInFiat
number | null
deprecated
amountInPaymentSymbol
number | null

Specifies the target amount in the payment/quote currency. For example, setting this to 10 when the AmountInPaymentSymbol = true and PaymentSymbol = USD will instruct the API to place an order to buy/sell the asset worth $10.

extendedHours
boolean

Specifies if the extended trading hours should be used.

mfaCode
string | null

MFA Code to create an order (requested by Kraken if MFA is enabled in user settings)

Response

200 - application/json
status
enum<string>
Available options:
ok,
serverFailure,
permissionDenied,
badRequest,
notFound,
conflict,
tooManyRequest,
locked,
unavailableForLegalReasons
message
string | null

A message generated by the API

displayMessage
string | null

User-friendly display message that can be presented to the end user

errorType
string | null

Strictly-typed error type that is explaining the reason of an unsuccessful status of the operation. All possible error types are available in the documentation.

errorData
any | null
content
object