Every API here is available over the APIs.io API and to AI agents over MCP.
openapi: 3.2.0
info:
title: Ledger Transactions API
x-refined-note:
- x-gitbook-description-document differs across the merged source definitions and was not carried
- x-gitbook-description-html differs across the merged source definitions and was not carried
- x-logo differs across the merged source definitions and was not carried
version: '1.0'
description: 'Operations tagged transactions across 2 of this provider''s published API definitions: ledger-enterprise-multisig-openapi.yml, ledger-enterprise-vault-openapi.yml. Each path carries the servers of the definition it was published in.'
tags:
- name: transactions
paths:
/api/v2/multisig-transactions/{safe_tx_hash}/:
get:
operationId: multisig_transactions_retrieve_2
description: Returns a multi-signature transaction given its Safe transaction hash
parameters:
- in: path
name: safe_tx_hash
schema:
type: string
required: true
tags:
- transactions
security:
- cookieAuth: []
- tokenAuth: []
- {}
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/SafeMultisigTransactionResponseSerializerV2'
description: ''
x-gitbook-description-document:
object: document
data:
schemaVersion: 8
nodes:
- object: block
type: paragraph
isVoid: false
data: {}
nodes:
- object: text
leaves:
- object: leaf
text: Returns a multi-signature transaction given its Safe transaction hash
marks: []
x-gitbook-description-html: <p>Returns a multi-signature transaction given its Safe transaction hash</p>
delete:
operationId: multisig_transactions_destroy_2
description: "Removes the queued but not executed multi-signature transaction associated with the given Safe transaction hash.\nOnly the proposer or the delegate who proposed the transaction can delete it.\nIf the transaction was proposed by a delegate, it must still be a valid delegate for the transaction proposer.\nAn EOA is required to sign the following EIP-712 data:\n\n```python\n {\n \"types\": {\n \"EIP712Domain\": [\n {\"name\": \"name\", \"type\": \"string\"},\n {\"name\": \"version\", \"type\": \"string\"},\n {\"name\": \"chainId\", \"type\": \"uint256\"},\n {\"name\": \"verifyingContract\", \"type\": \"address\"},\n ],\n \"DeleteRequest\": [\n {\"name\": \"safeTxHash\", \"type\": \"bytes32\"},\n {\"name\": \"totp\", \"type\": \"uint256\"},\n ],\n },\n \"primaryType\": \"DeleteRequest\",\n \"domain\": {\n \"name\": \"Safe Transaction Service\",\n \"version\": \"1.0\",\n \"chainId\": chain_id,\n \"verifyingContract\": safe_address,\n },\n \"message\": {\n \"safeTxHash\": safe_tx_hash,\n \"totp\": totp,\n },\n}\n```\n\n`totp` parameter is calculated with `T0=0` and `Tx=3600`. `totp` is calculated by taking the\nUnix UTC epoch time (no milliseconds) and dividing by 3600 (natural division, no decimals)"
parameters:
- in: path
name: safe_tx_hash
schema:
type: string
required: true
tags:
- transactions
security:
- cookieAuth: []
- tokenAuth: []
- {}
responses:
'204':
description: No response body
x-gitbook-description-html: <p>No response body</p>
x-gitbook-description-document:
object: document
data:
schemaVersion: 8
nodes:
- object: block
type: paragraph
isVoid: false
data: {}
nodes:
- object: text
leaves:
- object: leaf
text: 'Removes the queued but not executed multi-signature transaction associated with the given Safe transaction hash. Only the proposer or the delegate who proposed the transaction can delete it. If the transaction was proposed by a delegate, it must still be a valid delegate for the transaction proposer. An EOA is required to sign the following EIP-712 data:'
marks: []
- object: block
type: code
isVoid: false
data:
syntax: python
nodes:
- object: block
type: code-line
isVoid: false
data: {}
nodes:
- object: text
leaves:
- object: leaf
text: ' {'
marks: []
- object: block
type: code-line
isVoid: false
data: {}
nodes:
- object: text
leaves:
- object: leaf
text: ' "types": {'
marks: []
- object: block
type: code-line
isVoid: false
data: {}
nodes:
- object: text
leaves:
- object: leaf
text: ' "EIP712Domain": ['
marks: []
- object: block
type: code-line
isVoid: false
data: {}
nodes:
- object: text
leaves:
- object: leaf
text: ' {"name": "name", "type": "string"},'
marks: []
- object: block
type: code-line
isVoid: false
data: {}
nodes:
- object: text
leaves:
- object: leaf
text: ' {"name": "version", "type": "string"},'
marks: []
- object: block
type: code-line
isVoid: false
data: {}
nodes:
- object: text
leaves:
- object: leaf
text: ' {"name": "chainId", "type": "uint256"},'
marks: []
- object: block
type: code-line
isVoid: false
data: {}
nodes:
- object: text
leaves:
- object: leaf
text: ' {"name": "verifyingContract", "type": "address"},'
marks: []
- object: block
type: code-line
isVoid: false
data: {}
nodes:
- object: text
leaves:
- object: leaf
text: ' ],'
marks: []
- object: block
type: code-line
isVoid: false
data: {}
nodes:
- object: text
leaves:
- object: leaf
text: ' "DeleteRequest": ['
marks: []
- object: block
type: code-line
isVoid: false
data: {}
nodes:
- object: text
leaves:
- object: leaf
text: ' {"name": "safeTxHash", "type": "bytes32"},'
marks: []
- object: block
type: code-line
isVoid: false
data: {}
nodes:
- object: text
leaves:
- object: leaf
text: ' {"name": "totp", "type": "uint256"},'
marks: []
- object: block
type: code-line
isVoid: false
data: {}
nodes:
- object: text
leaves:
- object: leaf
text: ' ],'
marks: []
- object: block
type: code-line
isVoid: false
data: {}
nodes:
- object: text
leaves:
- object: leaf
text: ' },'
marks: []
- object: block
type: code-line
isVoid: false
data: {}
nodes:
- object: text
leaves:
- object: leaf
text: ' "primaryType": "DeleteRequest",'
marks: []
- object: block
type: code-line
isVoid: false
data: {}
nodes:
- object: text
leaves:
- object: leaf
text: ' "domain": {'
marks: []
- object: block
type: code-line
isVoid: false
data: {}
nodes:
- object: text
leaves:
- object: leaf
text: ' "name": "Safe Transaction Service",'
marks: []
- object: block
type: code-line
isVoid: false
data: {}
nodes:
- object: text
leaves:
- object: leaf
text: ' "version": "1.0",'
marks: []
- object: block
type: code-line
isVoid: false
data: {}
nodes:
- object: text
leaves:
- object: leaf
text: ' "chainId": chain_id,'
marks: []
- object: block
type: code-line
isVoid: false
data: {}
nodes:
- object: text
leaves:
- object: leaf
text: ' "verifyingContract": safe_address,'
marks: []
- object: block
type: code-line
isVoid: false
data: {}
nodes:
- object: text
leaves:
- object: leaf
text: ' },'
marks: []
- object: block
type: code-line
isVoid: false
data: {}
nodes:
- object: text
leaves:
- object: leaf
text: ' "message": {'
marks: []
- object: block
type: code-line
isVoid: false
data: {}
nodes:
- object: text
leaves:
- object: leaf
text: ' "safeTxHash": safe_tx_hash,'
marks: []
- object: block
type: code-line
isVoid: false
data: {}
nodes:
- object: text
leaves:
- object: leaf
text: ' "totp": totp,'
marks: []
- object: block
type: code-line
isVoid: false
data: {}
nodes:
- object: text
leaves:
- object: leaf
text: ' },'
marks: []
- object: block
type: code-line
isVoid: false
data: {}
nodes:
- object: text
leaves:
- object: leaf
text: '}'
marks: []
- object: block
type: paragraph
isVoid: false
data: {}
nodes:
- object: text
leaves:
- object: leaf
text: totp
marks:
- object: mark
type: code
data: {}
- object: leaf
text: ' parameter is calculated with '
marks: []
- object: leaf
text: T0=0
marks:
- object: mark
type: code
data: {}
- object: leaf
text: ' and '
marks: []
- object: leaf
text: Tx=3600
marks:
- object: mark
type: code
data: {}
- object: leaf
text: '. '
marks: []
- object: leaf
text: totp
marks:
- object: mark
type: code
data: {}
- object: leaf
text: ' is calculated by taking the Unix UTC epoch time (no milliseconds) and dividing by 3600 (natural division, no decimals)'
marks: []
x-gitbook-description-html: "<p>Removes the queued but not executed multi-signature transaction associated with the given Safe transaction hash. Only the proposer or the delegate who proposed the transaction can delete it. If the transaction was proposed by a delegate, it must still be a valid delegate for the transaction proposer. An EOA is required to sign the following EIP-712 data:</p><pre class=\"language-python\"><code class=\"lang-python\"> {\n \"types\": {\n \"EIP712Domain\": [\n {\"name\": \"name\", \"type\": \"string\"},\n {\"name\": \"version\", \"type\": \"string\"},\n {\"name\": \"chainId\", \"type\": \"uint256\"},\n {\"name\": \"verifyingContract\", \"type\": \"address\"},\n ],\n \"DeleteRequest\": [\n {\"name\": \"safeTxHash\", \"type\": \"bytes32\"},\n {\"name\": \"totp\", \"type\": \"uint256\"},\n ],\n },\n \"primaryType\": \"DeleteRequest\",\n \"domain\": {\n \"name\": \"Safe Transaction Service\",\n \"version\": \"1.0\",\n \"chainId\": chain_id,\n \"verifyingContract\": safe_address,\n },\n \"message\": {\n \"safeTxHash\": safe_tx_hash,\n \"totp\": totp,\n },\n}\n</code></pre><p><code>totp</code> parameter is calculated with <code>T0=0</code> and <code>Tx=3600</code>. <code>totp</code> is calculated by taking the Unix UTC epoch time (no milliseconds) and dividing by 3600 (natural division, no decimals)</p>"
/api/v2/safes/{address}/all-transactions/:
get:
operationId: safes_all_transactions_list_2
description: 'Returns all the *executed* transactions for a given Safe address.
The list has different structures depending on the transaction type:
- Multisig Transactions for a Safe. `tx_type=MULTISIG_TRANSACTION`.
- Module Transactions for a Safe. `tx_type=MODULE_TRANSACTION`
- Incoming Transfers of Ether/ERC20 Tokens/ERC721 Tokens. `tx_type=ETHEREUM_TRANSACTION`
Ordering_fields: ["timestamp"] eg: `-timestamp` (default one) or `timestamp`
Note: This endpoint has a bug that will be fixed in next versions of the endpoint. Pagination is done
using the `Transaction Hash`, and due to that the number of relevant transactions with the same
`Transaction Hash` cannot be known beforehand. So if there are only 2 transactions
with the same `Transaction Hash`, `count` of the endpoint will be 1
but there will be 2 transactions in the list.'
parameters:
- in: path
name: address
schema:
type: string
required: true
- name: ordering
required: false
in: query
description: Which field to use when ordering the results.
schema:
type: string
x-gitbook-description-html: <p>Which field to use when ordering the results.</p>
- name: limit
required: false
in: query
description: Number of results to return per page.
schema:
type: integer
x-gitbook-description-html: <p>Number of results to return per page.</p>
- name: offset
required: false
in: query
description: The initial index from which to return the results.
schema:
type: integer
x-gitbook-description-html: <p>The initial index from which to return the results.</p>
tags:
- transactions
security:
- cookieAuth: []
- tokenAuth: []
- {}
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/PaginatedAllTransactionsSchemaSerializerV2List'
description: ''
x-gitbook-description-document:
object: document
data:
schemaVersion: 8
nodes:
- object: block
type: paragraph
isVoid: false
data: {}
nodes:
- object: text
leaves:
- object: leaf
text: 'Returns all the '
marks: []
- object: leaf
text: executed
marks:
- object: mark
type: italic
data: {}
- object: leaf
text: ' transactions for a given Safe address. The list has different structures depending on the transaction type:'
marks: []
- object: block
type: list-unordered
isVoid: false
data: {}
nodes:
- object: block
type: list-item
isVoid: false
data: {}
nodes:
- object: block
type: paragraph
isVoid: false
data: {}
nodes:
- object: text
leaves:
- object: leaf
text: 'Multisig Transactions for a Safe. '
marks: []
- object: leaf
text: tx_type=MULTISIG_TRANSACTION
marks:
- object: mark
type: code
data: {}
- object: leaf
text: .
marks: []
- object: block
type: list-item
isVoid: false
data: {}
nodes:
- object: block
type: paragraph
isVoid: false
data: {}
nodes:
- object: text
leaves:
- object: leaf
text: 'Module Transactions for a Safe. '
marks: []
- object: leaf
text: tx_type=MODULE_TRANSACTION
marks:
- object: mark
type: code
data: {}
- object: block
type: list-item
isVoid: false
data: {}
nodes:
- object: block
type: paragraph
isVoid: false
data: {}
nodes:
- object: text
leaves:
- object: leaf
text: 'Incoming Transfers of Ether/ERC20 Tokens/ERC721 Tokens. '
marks: []
- object: leaf
text: tx_type=ETHEREUM_TRANSACTION
marks:
- object: mark
type: code
data: {}
- object: leaf
text: ' Ordering_fields: ["timestamp"] eg: '
marks: []
- object: leaf
text: -timestamp
marks:
- object: mark
type: code
data: {}
- object: leaf
text: ' (default one) or '
marks: []
- object: leaf
text: timestamp
marks:
- object: mark
type: code
data: {}
- object: block
type: paragraph
isVoid: false
data: {}
nodes:
- object: text
leaves:
- object: leaf
text: 'Note: This endpoint has a bug that will be fixed in next versions of the endpoint. Pagination is done using the '
marks: []
- object: leaf
text: Transaction Hash
marks:
- object: mark
type: code
data: {}
- object: leaf
text: ', and due to that the number of relevant transactions with the same '
marks: []
- object: leaf
text: Transaction Hash
marks:
- object: mark
type: code
data: {}
- object: leaf
text: ' cannot be known beforehand. So if there are only 2 transactions with the same '
marks: []
- object: leaf
text: Transaction Hash
marks:
- object: mark
type: code
data: {}
- object: leaf
text: ', '
marks: []
- object: leaf
text: count
marks:
- object: mark
type: code
data: {}
- object: leaf
text: ' of the endpoint will be 1 but there will be 2 transactions in the list.'
marks: []
x-gitbook-description-html: '<p>Returns all the <em>executed</em> transactions for a given Safe address. The list has different structures depending on the transaction type:</p><ul><li>Multisig Transactions for a Safe. <code>tx_type=MULTISIG_TRANSACTION</code>.</li><li>Module Transactions for a Safe. <code>tx_type=MODULE_TRANSACTION</code></li><li>Incoming Transfers of Ether/ERC20 Tokens/ERC721 Tokens. <code>tx_type=ETHEREUM_TRANSACTION</code> Ordering_fields: ["timestamp"] eg: <code>-timestamp</code> (default one) or <code>timestamp</code></li></ul><p>Note: This endpoint has a bug that will be fixed in next versions of the endpoint. Pagination is done using the <code>Transaction Hash</code>, and due to that the number of relevant transactions with the same <code>Transaction Hash</code> cannot be known beforehand. So if there are only 2 transactions with the same <code>Transaction Hash</code>, <code>count</code> of the endpoint will be 1 but there will be 2 transactions in the list.</p>'
/api/v2/safes/{address}/multisig-transactions/:
get:
operationId: safes_multisig_transactions_list_2
description: 'Returns all the multi-signature transactions for a given Safe address.
By default, only ``trusted`` multisig transactions are returned.'
parameters:
- in: path
name: address
schema:
type: string
required: true
- in: query
name: failed
schema:
type: boolean
- in: query
name: modified__lt
schema:
type: string
format: date-time
- in: query
name: modified__gt
schema:
type: string
format: date-time
- in: query
name: modified__lte
schema:
type: string
format: date-time
- in: query
name: modified__gte
schema:
type: string
format: date-time
- in: query
name: nonce__lt
schema:
type: number
- in: query
name: nonce__gt
schema:
type: number
- in: query
name: nonce__lte
schema:
type: number
- in: query
name: nonce__gte
schema:
type: number
- in: query
name: nonce
schema:
type: number
- in: query
name: safe_tx_hash
schema:
type: string
format: byte
- in: query
name: to
schema:
type: string
- in: query
name: value__lt
schema:
type: number
- in: query
name: value__gt
schema:
type: number
- in: query
name: value
schema:
type: number
- in: query
name: executed
schema:
type: boolean
- in: query
name: has_confirmations
schema:
type: boolean
- in: query
name: trusted
schema:
type: boolean
- in: query
name: execution_date__gte
schema:
type: string
format: date-time
- in: query
name: execution_date__lte
schema:
type: string
format: date-time
- in: query
name: submission_date__gte
schema:
type: string
format: date-time
- in: query
name: submission_date__lte
schema:
type: string
format: date-time
- in: query
name: transaction_hash
schema:
type:
- string
- 'null'
format: byte
- name: ordering
required: false
in: query
description: Which field to use when ordering the results.
schema:
type: string
x-gitbook-description-html: <p>Which field to use when ordering the results.</p>
- name: limit
required: false
in: query
description: Number of results to return per page.
schema:
type: integer
x-gitbook-description-html: <p>Number of results to return per page.</p>
- name: offset
required: false
in: query
description: The initial index from which to return the results.
schema:
type: integer
x-gitbook-description-html: <p>The initial index from which to return the results.</p>
tags:
- transactions
security:
- cookieAuth: []
- tokenAuth: []
- {}
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/PaginatedSafeMultisigTransactionResponseSerializerV2List'
description: ''
'400':
description: Invalid data
x-gitbook-description-html: <p>Invalid data</p>
'422':
content:
application/json:
schema:
$ref: '#/components/schemas/CodeErrorResponse'
description: Invalid ethereum address
x-gitbook-description-html: <p>Invalid ethereum address</p>
x-gitbook-description-document:
object: document
data:
schemaVersion: 8
nodes:
- object: block
type: paragraph
isVoid: false
data: {}
nodes:
- object: text
leaves:
- object: leaf
text: 'Returns all the multi-signature transactions for a given Safe address. By default, only '
marks: []
- object: leaf
text: trusted
marks:
- object: mark
type: code
data: {}
- object: leaf
text: ' multisig transactions are returned.'
marks: []
x-gitbook-description-html: <p>Returns all the multi-signature transactions for a given Safe address. By default, only <code>trusted</code> multisig transactions are returned.</p>
post:
operationId: safes_multisig_transactions_create_2
description: 'Creates a multi-signature transaction for a given Safe account with its confirmations and
retrieves all the information related.'
parameters:
- in: path
name: address
schema:
type: string
required: true
tags:
- transactions
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/SafeMultisigTransaction'
required: true
security:
- cookieAuth: []
- tokenAuth: []
- {}
responses:
'201':
description: Created or signature updated
x-gitbook-description-html: <p>Created or signature updated</p>
'400':
description: Invalid data
x-gitbook-description-html: <p>Invalid data</p>
'422':
content:
application/json:
schema:
$ref: '#/components/schemas/CodeErrorResponse'
description: Invalid ethereum address | User is not an owner | Invalid safeTxHash |Invalid signature | Nonce already executed | Sender is not an owner
x-gitbook-description-html: <p>Invalid ethereum address | User is not an owner | Invalid safeTxHash |Invalid signature | Nonce already executed | Sender is not an owner</p>
x-gitbook-description-document:
object: document
data:
schemaVersion: 8
nodes:
- object: block
type: paragraph
isVoid: false
data: {}
nodes:
- object: text
leaves:
- object: leaf
text: Creates a multi-signature transaction for a given Safe account with its confirmations and retrieves all the information related.
marks: []
x-gitbook-description-html: <p>Creates a multi-signature transaction for a given Safe account with its confirmations and retrieves all the information related.</p>
/accounts/{account_id}/sync:
get:
summary: Sync the account to update transactions with list status
tags:
- transactions
description: This will synchronize the account's transactions status with the one on the blockchain
parameters:
- name: account_id
in: path
description: The account's ID
required: true
schema:
type: integer
- name: synchronous
in: query
description: If true, the synchronization will be performed synchronously. Otherwise, it will run a a background task
required: false
schema:
default: false
example: true
type:
- boolean
- 'null'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/Account'
description: Account object
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: Account not found
security:
- Ledger_API_User: []
- Ledger_API_User: []
Ledger_API_Key: []
- Ledger_API_User: []
Ledger_Store_Auth_Token: []
- Ledger_API_User: []
Ledger_API_Key: []
Ledger_Store_Auth_Token: []
/transactions:
get:
summary: Search Transaction
tags:
- transactions
description: 'Use the following parameters to search transactions.
Beware that default order is "desc", which can cause surprising
result with pagination if transactions are being inserted.
see [Pagination](#section/Introduction/Pagination) for more details
'
parameters:
- name: account
in: query
description: Returns transactions created in the provided account.
required: false
explode: true
schema:
default: null
items:
type: integer
type:
- array
- 'null'
style: form
- name: created_after
in: query
description: Returns objects created after the entered date.
required: false
schema:
default: null
example: '2020-09-12T14:15:22Z'
format: date-time
type:
- string
- 'null'
- name: created_before
in: query
description: Returns objects created before the entered date.
required: false
schema:
default: null
example: '2020-12-13T16:17:28Z'
format: date-time
type:
- string
- 'null'
- name: currency
in: query
description: Returns transactions created in the provided currency.
required: false
explode: true
schema:
default: null
example: bitcoin or ethereum:0xdAC17F958D2ee523a2206206994597C13D831ec7
items:
type: string
type:
- array
- 'null'
style: form
- name: destination_tag
in: query
description: Returns transactions that match the provided destination tag (XRP only).
required: false
schema:
default: null
type:
- integer
- 'null'
- name: id
in: query
description: Returns the object corresponding to the entered ID
# --- truncated at 32 KB (161 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/ledger/refs/heads/main/openapi/ledger-transactions-api-openapi.yml