Trade resource

This section describes all the available parameters of the trade resource.
It is a JSON object and when reading one from the (Get Trade Information) API you get the payload/s as described in this section.

👍

Available parameters of the Trade resource transferIn and transferOut objects depend on the type of the trade created!

This API distinguishes between three types of trades:

  • Card Buy: Type of the trade where a Credit Card payment is used to purchase a cryptocurrency.
  • Bank Buy: Type of the trade where a Bank transfer payment is used to purchase a cryptocurrency.
  • Blockchain Sell: Type of the trade where a blockchain transaction is used to sell a cryptocurrency for a FIAT currency (e.g. USD, EUR)...

The type of a trade is defined by the transferIn.medium and transferOut.medium parameter values.

transferIn.medium defines the incoming transaction for the trade (i.e. payment method)

transferOut.medium defines the outgoing transaction for the trade (i.e. payout method).

Depending on the defined mediumparameter values, transferIn and transferOutobjects will provide different relevant parameters and ßdata.

Trade Object

This is the general top-level trade object. On this level, the trade object is the same for any type of the trade:

KeyTypeDescription
idIntegerUnique ID for this trade
traderIdIntegerReference to the trader that created the trade
traderEmailStringEmail address of trader that created the trade
stateTrade stateThe current state of the trade
inCurrencyStringCurrency (ISO 4217) denominating inAmount.
outCurrencyStringCurrency (ISO 4217) denominating outAmount or outAmountExpected.
inAmountFloatThe amount of inAmount that this trade covers. Is always positive.
outAmountFloat(Optional) The amount of outCurrency that this trade resulted in. Is always positive. NOTE: This field is only defined if the state of the trade is completed. For all other states, see the outAmountExpected field.
outAmountExpectedFloatThe amount of outCurrency that this trade is expected to result in. Is always positive.
transferInTransfer in objectObject describing how we (Coinify) will receive/have received the money to fund the trade.
transferOutTransfer out objectObject describing how we (Coinify) will send/have sent the result of the trade back to the trader.
quoteExpireTimeISO 8601 time(Optional) The time when the price quote underlying this trade expires. NOTE: This field is only defined in the following states: awaiting_transfer_in, processing, reviewing, payment_authorized.
updateTimeISO 8601 timeThe time when the trade was last updated.
createTimeISO 8601 timeTimestamp for when this trade was first created
isPriceQuoteApproximateBooleanDefines whether the quote is guaranteed to the end-user.
In case of Credit Card buy trade and blockchain sell trade it is false, meaning that the quote is guaranteed.
In case of Bank buy trade it is set to true, meaning the quote is not guaranteed. This is due to the fact that the end-user can complete a bank transfer for a trade inside a 30 day window where the prices can change a lot. Thus, the quote is updated at the time of received bank transfer.

transferIn object available parameters:

ParameterTypeDescription
idIntegerID of the transferIn object.
sendAmountFloatAmount that is/will be sent to this transfer. Denominated in currency. Is always positive.
receiveAmountFloatAmount that this transfer will result in. Denominated in currency. Is always positive and equal to or smaller then sendAmount. The difference between the sendAmount and the receiveAmount will be the fee of the transfer.
currencyStringCurrency (ISO 4217) that this transfer is/will be denominated in.
mediumStringTransfer medium. The medium transferring the currency.
detailsObjectInformation relevant for the defined incoming transaction (transferIn.medium).
Available parameters differ depending on the specified medium.
See available parameters in case of:
▫️ transferIn.medium= card
▫️ transferIn.medium= bank
▫️ transferIn.medium= blockchain

transferIn .medium parameter available values

Available medium values for the transferIn object. Describes the incoming transaction, i.e. payment method of a trade.

MediumDescription
cardSpecifies Credit Card transaction as the incoming payment type for the trade.
bankBank - Specifies Bank Transfer as the incoming payment type for the trade. In this case, Coinify's bank account details are provided in the transferIn.details object.
blockchainBlockchain - Specifies a blockchain transfer as the incoming transaction for the trade. E.g. end-user sending Bitcoin. NOTE: The currency field of the transfer object will determine which blockchain currency.

transferOut object available parameters

ParameterTypeDescription
sendAmountFloatFIAT amount that expected to be sent by the end-user to Coinify in order to complete the trade. Denominated in currency. Is always positive.
receiveAmountFloatFIAT amount that the end-user will receive for the completed trade. Denominated in currency. Is always positive and equal to or smaller than the sendAmount. The difference between the sendAmount and the receiveAmount will be the fee of the transfer.
currencyStringCurrency (ISO 4217) that this outgoing transfer is denominated in.
mediumStringTransfer medium. The medium transferring the currency.
mediumReceiveAccountIdIntegerReference to our internal accounts. Note at the moment we only have internal bank accounts.
detailsObjectInformation relevant for the defined outgoing transaction (transferOut.medium).
See available parameters in case of:
▫️ transferOut.medium= bank
▫️ transferOut.medium= blockchain (same value for Card and Bank buy trades)

transferOut . medium available values

Available medium values for transferOut object. Defines the outgoing transaction, usually the destination account.

MediumDescription
bankDetails of the end-user's receiving bank account to which a bank transfer for the Sell trade will be executed.
blockchainBlockchain - Transfer on a public blockchain, such as Bitcoin. NOTE: The currency field of the transfer object will determine which blockchain currency.

transferIn.details & transferOut.details object parameters

transferIn.details object and transferOut.details object available parameters can be different depending on the specified transferIn.medium and transferOut.medium parameter values. Put differently, the details objects' parameters differ based on the type of the specific trade.

As mentioned on the top of this page, currently, there are three main types of trades and in the following paragraphs the available details object parameters will be described for each of the trade type.

💳 Credit Card Buy Trade

transferIn.Medium: card & transferOut.Medium: blockchain

transferIn.details:

ParameterTypeDescription
providerStringCredit card processor that will be in charge for the credit card payment.
returnUrlStringThe return URL to which the user to be sent back after the payment has been created.
redirectUrlStringThe URL to which the end-user must be redirected in order to provide the credit card details to pay for the trade.
cardPaymentIdIntegerID of the card payment
isApplePayAvailableBooleanSpecifies whether Apple Pay is an available payment option for the trade.

transferOut.details:

ParameterTypeDescription
accountStringBlockchain address. The blockchain account receiving the money in this transfer (blockchain address).

🏦 Bank Transfer Buy Trade

transferIn.Medium: bank & transferOut.Medium: blockchain

transferIn.details:

ParameterTypeDescription
accountObjectObject with additional information about the bank account.
→bicStringFor SEPA and international its the SWIFT/ BIC number and for danish accounts its the REG number. Optional in case of domestic bank transfers.
→typeBank account typeType of the bank account.
→numberStringFor SEPA and international it’s the IBAN (International Bank Account Number). For danish accounts, it’s the BBAN (Basic Bank Account Number). Optional in case of domestic bank transfers.
→currencyStringCurrency of the bank account.
referenceTextStringText that the bank transfer must contain in order for Coinify's system to correctly match it what trade it concerns.
→domesticAccountNumberString(Optional) Account Number for domestic transfers.
→regNoString(Optional) Reg. No. used for some domestic transfers.
→routingCodeStringRouting Code used for some domestic transfers. (Optional)
→sortCodeStringSort Code used for some domestic transfers. (Optional)
→bsbStringBSB used for some domestic transfers. (Optional)
bankObjectObject with additional information about the bank.
→nameStringName of the bank.
→addressObjectObject with information about the address of the bank.
→streetStringStreet address.
→zipcodeStringZip/Postal code.
→cityStringCity as the part of the address where the bank is registered.
→stateString(Optional) State where the bank is located.
→countryStringISO 3166-1 alpha-2 country code. Country where the bank is located.
holderObjectObject with additional information about the bank account holder.
→nameStringName of the bank account holder.
→addressObjectObject with information about the address of the account holder.
→streetStringStreet address.
→zipcodeStringZip/Postal code.
→cityStringCity.
→stateString(Optional) State where the holder is located.
→countryStringISO 3166-1 alpha-2 country code.

transferOut.details:

ParameterTypeDescription
accountStringBlockchain address. The blockchain account receiving the money in this transfer (blockchain address).

⛓️ Blockchain Sell Trade

transferIn.Medium: blockchain & transferOut.Medium: bank

transferIn.details

ParameterTypeDescription
accountStringBlockchain address. The blockchain account receiving the money in this transfer (blockchain address).
accountSignatureStringHMAC-SHA-256 signature signing the account value. Only defined if a shared secret has been established with Coinify.
memoStringOptional memo for currencies where memo/destination tag is supported.
transactionStringTransaction sending the money in this transfer. Only defined if money has been sent.
refundAccountStringAccount to refund the money in this transfer in case of failure. Only defined if currency != BTC.
refundAccountSignatureStringHMAC-SHA-256 signature signing the refundAccount value. Only defined if refundAccount is defined and a shared secret has been established with Coinify.
paymentUriStringPayment URI scheme to generate QR code.)

transferOut.details:

ParameterTypeDescription
accountObjectObject with additional information about the bank account.
→bicStringFor SEPA and international its the SWIFT/ BIC number and for danish accounts its the REG number. Optional in case of domestic bank transfers.
→typeBank account typeType of the bank account.
→numberStringFor SEPA and international it’s the IBAN (International Bank Account Number). For danish accounts, it’s the BBAN (Basic Bank Account Number). Optional in case of domestic bank transfers.
→currencyStringCurrency of the bank account.
referenceTextStringText that the bank transfer must contain in order for Coinify's system to correctly match it what trade it concerns.
→domesticAccountNumberString(Optional) Account Number for domestic transfers.
→regNoString(Optional) Reg. No. used for some domestic transfers.
→routingCodeStringRouting Code used for some domestic transfers. (Optional)
→sortCodeStringSort Code used for some domestic transfers. (Optional)
→bsbStringBSB used for some domestic transfers. (Optional)
bankObjectObject with additional information about the bank.
→nameStringName of the bank.
→addressObjectObject with information about the address of the bank.
→streetStringStreet address.
→zipcodeStringZip/Postal code.
→cityStringCity as the part of the address where the bank is registered.
→stateString(Optional) State where the bank is located.
→countryStringISO 3166-1 alpha-2 country code. Country where the bank is located.
holderObjectObject with additional information about the bank account holder.
→nameStringName of the bank account holder.
→addressObjectObject with information about the address of the account holder.
→streetStringStreet address.
→zipcodeStringZip/Postal code.
→cityStringCity.
→stateString(Optional) State where the holder is located.
→countryStringISO 3166-1 alpha-2 country code.