Skip to main content

Execute transaction

Confirms the purchase/sell-back based on the quotations provided. Once done so, gold grams will be allocated to the said account as per quotation given.

Path Parameters
accountId string REQUIRED

The identifier of the account that will be associated with this API call. This value will be provided by Silver Bullion.

operation string REQUIRED

The type of transaction the product.

Example (Purchasing): purchase
Example (Selling): sellback
Request Body

JSON Object to provide when executing transactions.

object[]
encSpotToken string

The encrypted token provided with the spot-rate that will be used for this transaction.

metalCode string

Possible values: 3 ≤ length ≤ 3

The ISO-4271 Alpha-3 code for the metal involved with this transaction.

metalGrams decimal

The amount of metal grams that the client would like to purchase or perform a sellback with. To calculate this value, we will use the formula (fiatAmount/rate). The final value is then rounded down to the nearest 8 d.p. in the value of a sellback, and rounded arithmetically to 8 d.p. in the event of a sellback.

fiatAmount money

The amount of fiat involved for the transaction. Must be a whole number or a number with 2 decimal places.

currency string

The ISO-4271(alpha-3) Currency code of the currency used to perform the transaction.

clientTransactionReference string

Possible values: length ≤ 100

The identifier of the transaction provided by the caller. Each [object] in the API call is deemed as an individual transaction and must remain unique.

settlementId string

Possible values: length ≤ 100

The identifier used by the caller for settlement purposes. The same settlementId value cannot be used for both [Purchase] and [Sellback] operations.

Responses
200

Success

Schema
receivedRequests number

Total number of transactions received in the API call.

succesfulRequestCount number

Total number of transactions that was processed successfully from the API call.

failedRequestCount number

Total number of transactions received in the API call.

successfulRequests object[]

List of transactions that are successfully processed from the API call

ClientTransactionReference string

The identifier of the transaction provided by the caller.

Currency string

The currency used to perform the transaction.

fiatAmount money

The amount of fiat involved for the transaction. Value here will always be in 2 decimal places.

utilisedSpot decimal

The rate (based on per-grams, operation and the currency stated) which was used to perform the transaction.

metalCode string

Possible values: 3 ≤ length ≤ 3

The ISO-4271 Alpha-3 code for the metal involved with this transaction.

metalAmount decimal

The amount of metal grams being purchased or sold-back from the transaction. Value displayed here will always be up to 2 decimal places. In the event of purchases, we round this DOWN to th nearest 4 d.p., in the event of sellbacks, we round this (as per common rounding) to the nearest 4 d.p.

operation

Possible values: [Purchase, Sellback]

status string

Shows the current status of the transaction.

failedRequests string[]

The [ClientTransactionReference] provided for transactions that failed to be processed, but passed validation check. In normal circumstances, this list is usually empty.

400

Transactions not processed.

Schema
errors object[]

Provides specific details about the errors encountered and on which underlying records

errorCode string

A brief set of characters that describe the error. Valid values include [NegativeFiatAmountProvided], [DuplicateTransactionReferencesInSameRequest], [ClientTransactionReferenceAlreadyExists], [MetalMismatch], [ExpiredToken], [CurrencyMismatch], [MismatchOnMetalGrams] and [InsufficientBalance].

errorMessage string

A human readable version of what went wrong during the validation process.

recordIdentifierName string

The name of the identifier (known to the caller) which will be used to display the errorneous records relating to this error.

records undefined[]

The list of transaction identifiers (mentioned in [recordIdentifierName] that had a hit with this error.)

errorCount integer

The number of failing points which caused the call to be rejected.

type url

A URI reference that identifies the problem type as detailed in RFC-3896 (https://www.rfc-editor.org/rfc/rfc3986). When dereferenced, it provide human-readable documentation for the problem

title string

Short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence.

status number

The advisory status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem. This is the same status code returned from this API call.

detail string

By convention, this should provide a human-readable explanation specific to this occurrence of the problem and ought to focus on helping the client correct the problem, rather than giving debugging information. In the event there are seveal errors, a reference to another field will be made.

instance string

A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.

traceId string

Used mainly for error tracing purposes.

401

The accountId provided is not the account assigned for your credentials.

Schema
type string

A URI that identifies the specific problem type. This can be an absolute URI or a relative URI that resolves to a document describing the problem type.

title string

A brief, human-readable summary of the problem.

status integer

The HTTP status code generated by the server for this occurrence of the problem. The status code should indicate the nature of the problem.

detail string

A human-readable explanation of the specific problem. This field provides additional details or context about the problem.

instance string

A URI that identifies the specific occurrence of the problem. It can be used to provide additional details or to link to more information.