Submit the signed order
curl --request POST \
--url https://partners-api.sandbox.securitize.io/stocks/v1/stocks/execute-signed-transaction \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"investorId": "6b31c0e9a4f2d17e85c3b904",
"signedTransaction": "AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA…",
"tokenId": "3f7b2c1e-9d4a-4e6b-8a1f-5c2d0e9b7a46"
}
'const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
investorId: '6b31c0e9a4f2d17e85c3b904',
signedTransaction: 'AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA…',
tokenId: '3f7b2c1e-9d4a-4e6b-8a1f-5c2d0e9b7a46'
})
};
fetch('https://partners-api.sandbox.securitize.io/stocks/v1/stocks/execute-signed-transaction', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://partners-api.sandbox.securitize.io/stocks/v1/stocks/execute-signed-transaction"
payload = {
"investorId": "6b31c0e9a4f2d17e85c3b904",
"signedTransaction": "AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA…",
"tokenId": "3f7b2c1e-9d4a-4e6b-8a1f-5c2d0e9b7a46"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"transactionHash": "4ZkPfQ7nT2vXcR8yLmB3hW9sJdE6aK1uNqG5tYpC2rVxF8bH7jS3mD9wL6eA1zQ4oU5iT2nR8yK3cX7vB1mP"
}{
"statusCode": 400,
"message": "UNAVAILABLE_MARKET",
"error": "Bad Request"
}{
"message": "No API key found in request"
}{
"statusCode": 403,
"message": "UNAUTHORIZED_INVESTOR",
"error": "Forbidden"
}{
"statusCode": 409,
"message": "TRADE_IN_PROGRESS",
"error": "Conflict"
}{
"statusCode": 429,
"message": "ThrottlerException: Too Many Requests"
}Trading
Submit the signed order
Hands the transaction the investor signed back to Securitize, which broadcasts it. The investor’s signature is the acceptance of the order; the broadcast is when it becomes firm. On chain, the price, its expiry and minOutputAmount are checked again and the swap and its settlement happen in the same transaction: in full, or not at all.
The answer is the transaction’s hash. Follow it on chain for the outcome. Each prepared transaction can be submitted once.
POST
/
stocks
/
execute-signed-transaction
Submit the signed order
curl --request POST \
--url https://partners-api.sandbox.securitize.io/stocks/v1/stocks/execute-signed-transaction \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"investorId": "6b31c0e9a4f2d17e85c3b904",
"signedTransaction": "AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA…",
"tokenId": "3f7b2c1e-9d4a-4e6b-8a1f-5c2d0e9b7a46"
}
'const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
investorId: '6b31c0e9a4f2d17e85c3b904',
signedTransaction: 'AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA…',
tokenId: '3f7b2c1e-9d4a-4e6b-8a1f-5c2d0e9b7a46'
})
};
fetch('https://partners-api.sandbox.securitize.io/stocks/v1/stocks/execute-signed-transaction', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://partners-api.sandbox.securitize.io/stocks/v1/stocks/execute-signed-transaction"
payload = {
"investorId": "6b31c0e9a4f2d17e85c3b904",
"signedTransaction": "AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA…",
"tokenId": "3f7b2c1e-9d4a-4e6b-8a1f-5c2d0e9b7a46"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"transactionHash": "4ZkPfQ7nT2vXcR8yLmB3hW9sJdE6aK1uNqG5tYpC2rVxF8bH7jS3mD9wL6eA1zQ4oU5iT2nR8yK3cX7vB1mP"
}{
"statusCode": 400,
"message": "UNAVAILABLE_MARKET",
"error": "Bad Request"
}{
"message": "No API key found in request"
}{
"statusCode": 403,
"message": "UNAUTHORIZED_INVESTOR",
"error": "Forbidden"
}{
"statusCode": 409,
"message": "TRADE_IN_PROGRESS",
"error": "Conflict"
}{
"statusCode": 429,
"message": "ThrottlerException: Too Many Requests"
}Authorizations
Body
application/json