Skip to content

Commit

Permalink
Improve doc for groups
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasDorier committed Nov 28, 2024
1 parent f165b14 commit f37ef1c
Showing 1 changed file with 145 additions and 7 deletions.
152 changes: 145 additions & 7 deletions NBXplorer/wwwroot/api.json
Original file line number Diff line number Diff line change
Expand Up @@ -1772,20 +1772,20 @@
}
}
},
"/v1/cryptos/{cryptoCode}/derivations/{derivationScheme}/transactions": {
"/v1/cryptos/{cryptoCode}/groups/{groupId}/transactions": {
"get": {
"summary": "Get transactions for a derivation scheme",
"description": "Retrieves a list of transactions associated with the specified derivation scheme (wallet).",
"summary": "Get transactions for a group",
"description": "Retrieves a list of transactions associated with the specified group.",
"tags": [
"Derivations",
"Groups",
"Transactions"
],
"parameters": [
{
"$ref": "#/components/parameters/CryptoCode"
},
{
"$ref": "#/components/parameters/DerivationScheme"
"$ref": "#/components/parameters/GroupId"
},
{
"name": "includeTransaction",
Expand Down Expand Up @@ -1816,16 +1816,154 @@
},
"example": 1732769717,
"description": "Indicates the latest date up to which transactions should be retrieved, (default: null, unix time"
}
],
"responses": {
"200": {
"description": "Transactions retrieved successfully.",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/TransactionResponse"
}
},
"examples": {
"withoutTransaction": {
"summary": "Without raw transaction data",
"value": [
{
"blockHash": "0000000000000000000...",
"confirmations": 3,
"height": 600000,
"transactionId": "abcd1234...",
"outputs": [
{
"scriptPubKey": "76a91489abcdefabbaabbaabbaabbaabbaabbaabbaabba88ac",
"index": 0,
"value": 5000000000,
"keyPath": "0/0"
}
],
"inputs": [
{
"inputIndex": 0,
"transactionId": "efgh5678...",
"index": 1,
"scriptPubKey": "76a91489abcdefabbaabbaabbaabbaabbaabbaabbaabba88ac",
"value": 5000000000,
"address": "1BoatSLRHtKNngkdXEeobR76b53LETtpyT"
}
],
"timestamp": 1638307200,
"balanceChange": 0,
"replaceable": false,
"replacing": null,
"replacedBy": null
}
]
},
"withTransaction": {
"summary": "With raw transaction data",
"value": [
{
"blockHash": "0000000000000000000...",
"confirmations": 3,
"height": 600000,
"transactionId": "abcd1234...",
"transaction": "0200000001abcd1234...",
"outputs": [
{
"scriptPubKey": "76a91489abcdefabbaabbaabbaabbaabbaabbaabbaabba88ac",
"index": 0,
"value": 5000000000,
"keyPath": "0/0"
}
],
"inputs": [
{
"inputIndex": 0,
"transactionId": "efgh5678...",
"index": 1,
"scriptPubKey": "76a91489abcdefabbaabbaabbaabbaabbaabbaabbaabba88ac",
"value": 5000000000,
"address": "1BoatSLRHtKNngkdXEeobR76b53LETtpyT"
}
],
"timestamp": 1638307200,
"balanceChange": 0,
"replaceable": false,
"replacing": null,
"replacedBy": null
}
]
}
}
}
}
},
"404": {
"description": "Derivation scheme not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"example": {
"error": "Derivation scheme not found.",
"code": 404
}
}
}
}
}
}
},
"/v1/cryptos/{cryptoCode}/derivations/{derivationScheme}/transactions": {
"get": {
"summary": "Get transactions for a derivation scheme",
"description": "Retrieves a list of transactions associated with the specified derivation scheme (wallet).",
"tags": [
"Derivations",
"Transactions"
],
"parameters": [
{
"$ref": "#/components/parameters/CryptoCode"
},
{
"$ref": "#/components/parameters/DerivationScheme"
},
{
"name": "accountedOnly",
"name": "includeTransaction",
"in": "query",
"required": false,
"schema": {
"type": "boolean",
"default": false
},
"description": "If true, only returns transactions that affect the wallet's balance."
"description": "Optional. If set to `true`, each transaction in the response will include the raw transaction data in hexadecimal format (`transaction` field). Default is `false`."
},
{
"name": "from",
"in": "query",
"required": false,
"schema": {
"type": "integer"
},
"example": 1732769702,
"description": "Indicates the earliest date from which transactions should be retrieved, (default: null, unix time)"
},
{
"name": "to",
"in": "query",
"required": false,
"schema": {
"type": "integer"
},
"example": 1732769717,
"description": "Indicates the latest date up to which transactions should be retrieved, (default: null, unix time"
}
],
"responses": {
Expand Down

0 comments on commit f37ef1c

Please sign in to comment.