Skip to content

docs: update token wallet endpoints #398

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/openapi/portfolio/assets/tokens/by-address.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ requestBody:
content:
application/json:
schema:
$ref: "./../../portfolio.yaml#/components/schemas/ByAddressRequestWithOptions"
$ref: "./../../portfolio.yaml#/components/schemas/ByAddressRequestWithOptionsAndPaging"
responses:
"200":
description: Successful response!
Expand Down
48 changes: 48 additions & 0 deletions src/openapi/portfolio/portfolio.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,15 @@ components:
description: Whether to include each chain's native token in the response (e.g. ETH on Ethereum). The native token will have a null contract address.
example: false
default: false
includeErc20Tokens:
type: boolean
description: Whether to include ERC-20 tokens in the response.
example: false
default: true
pageKey:
$ref: "../nft/nft.yaml#/components/schemas/pageKey"
pageSize:
$ref: "../nft/nft.yaml#/components/schemas/pageSize"
required:
- addresses

Expand All @@ -419,6 +428,45 @@ components:
description: Whether to include each chain's native token in the response (e.g. ETH on Ethereum). The native token will have a null contract address.
example: false
default: false
includeErc20Tokens:
type: boolean
description: Whether to include ERC-20 tokens in the response.
example: false
default: true
required:
- addresses

ByAddressRequestWithOptionsAndPaging:
type: object
properties:
addresses:
type: array
description: >
Array of address and networks pairs (limit 2 pairs, max 5 networks each). Networks should match network enums.
items:
$ref: "#/components/schemas/AddressItem"
withMetadata:
description: "Boolean - if set to `true`, returns metadata. Setting this to false will reduce payload size and may result in a faster API call. Defaults to `true`."
type: boolean
default: true
withPrices:
description: "Boolean - if set to `true`, returns token prices. Setting this to false will reduce payload size and may result in a faster API call. Defaults to `true`."
type: boolean
default: true
includeNativeTokens:
type: boolean
description: Whether to include each chain's native token in the response (e.g. ETH on Ethereum). The native token will have a null contract address.
example: false
default: false
includeErc20Tokens:
type: boolean
description: Whether to include ERC-20 tokens in the response.
example: false
default: true
pageKey:
$ref: "../nft/nft.yaml#/components/schemas/pageKey"
pageSize:
$ref: "../nft/nft.yaml#/components/schemas/pageSize"
required:
- addresses

Expand Down