-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
285 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
components: | ||
schemas: | ||
AccountOffersRequest: | ||
type: object | ||
allOf: | ||
- $ref: ../../shared/requests/account_offers.yaml#/components/schemas/AccountOffersRequest | ||
properties: | ||
command: | ||
type: string | ||
enum: | ||
- account_offers | ||
id: | ||
description: A unique identifier for the request. | ||
required: | ||
- command | ||
- id | ||
example: | ||
id: 9 | ||
command: account_offers | ||
account: rpP2JgiMyTF5jR5hLG3xHCPi1knBb1v9cM | ||
AccountOffersResponse: | ||
type: object | ||
properties: | ||
result: | ||
type: object | ||
discriminator: | ||
propertyName: status | ||
mapping: | ||
success: ../../shared/requests/account_offers.yaml#/components/schemas/AccountOffersSuccessResponse | ||
error: '#/components/schemas/AccountOffersErrorResponse' | ||
oneOf: | ||
- $ref: ../../shared/requests/account_offers.yaml#/components/schemas/AccountOffersSuccessResponse | ||
- $ref: '#/components/schemas/AccountOffersErrorResponse' | ||
id: | ||
description: A unique identifier for the request. | ||
type: | ||
type: string | ||
description: | ||
The value response indicates a direct response to an API request. | ||
Asynchronous notifications use a different value such as | ||
`ledgerClosed` or `transaction`. | ||
enum: | ||
- response | ||
required: | ||
- id | ||
- type | ||
example: | ||
id: 9 | ||
status: success | ||
type: response | ||
result: | ||
account: rpP2JgiMyTF5jR5hLG3xHCPi1knBb1v9cM | ||
ledger_current_index: 18539550 | ||
offers: | ||
- flags: 0 | ||
quality: '0.00000000574666765650638' | ||
seq: 6577664 | ||
taker_gets: '33687728098' | ||
taker_pays: | ||
currency: EUR | ||
issuer: rhub8VRN55s94qWKDv6jmDy1pUykJzF3wq | ||
value: '193.5921774819578' | ||
- flags: 0 | ||
quality: '7989247009094510e-27' | ||
seq: 6572128 | ||
taker_gets: '2361918758' | ||
taker_pays: | ||
currency: XAU | ||
issuer: rrh7rf1gV2pXAoqA8oYbpHd8TKv5ZQeo67 | ||
value: '0.01886995237307572' | ||
validated: false | ||
AccountOffersErrorResponse: | ||
oneOf: | ||
- $ref: ../../shared/base.yaml#/components/schemas/WebsocketErrorFields | ||
- $ref: ../../shared/requests/account_offers.yaml#/components/schemas/AccountOffersErrorResponse |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
components: | ||
schemas: | ||
AccountOffersRequest: | ||
type: object | ||
properties: | ||
method: | ||
type: string | ||
enum: | ||
- account_offers | ||
params: | ||
type: array | ||
items: | ||
$ref: ../../shared/requests/account_offers.yaml#/components/schemas/AccountOffersRequest | ||
required: | ||
- method | ||
example: | ||
method: account_offers | ||
params: | ||
- account: rpP2JgiMyTF5jR5hLG3xHCPi1knBb1v9cM | ||
AccountOffersResponse: | ||
type: object | ||
properties: | ||
result: | ||
type: object | ||
discriminator: | ||
propertyName: status | ||
mapping: | ||
success: ../../shared/requests/account_offers.yaml#/components/schemas/AccountOffersSuccessResponse | ||
error: ../../shared/requests/account_offers.yaml#/components/schemas/AccountOffersErrorResponse | ||
oneOf: | ||
- $ref: ../../shared/requests/account_offers.yaml#/components/schemas/AccountOffersSuccessResponse | ||
- $ref: ../../shared/requests/account_offers.yaml#/components/schemas/AccountOffersErrorResponse | ||
required: | ||
- result | ||
example: | ||
result: | ||
account: rpP2JgiMyTF5jR5hLG3xHCPi1knBb1v9cM | ||
ledger_current_index: 18539596 | ||
offers: | ||
- flags: 0 | ||
quality: '0.000000007599140009999998' | ||
seq: 6578020 | ||
taker_gets: '29740867287' | ||
taker_pays: | ||
currency: USD | ||
issuer: rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q | ||
value: '226.0050145327418' | ||
- flags: 0 | ||
quality: '7989247009094510e-27' | ||
seq: 6572128 | ||
taker_gets: '2361918758' | ||
taker_pays: | ||
currency: XAU | ||
issuer: rrh7rf1gV2pXAoqA8oYbpHd8TKv5ZQeo67 | ||
value: '0.01886995237307572' | ||
- flags: 0 | ||
quality: '0.00000004059594001318974' | ||
seq: 6576905 | ||
taker_gets: '3892952574' | ||
taker_pays: | ||
currency: CNY | ||
issuer: rKiCet8SdvWxPXnAgYarFUXMh1zCPz432Y | ||
value: '158.0380691682966' | ||
status: success | ||
validated: false | ||
AccountOffersSuccessResponse: | ||
type: object | ||
allOf: | ||
- $ref: ../../shared/base.yaml#/components/schemas/BaseSuccessResponse | ||
- $ref: ../../shared/requests/account_offers.yaml#/components/schemas/AccountOffersSuccessResponse |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
components: | ||
schemas: | ||
AccountOffersRequest: | ||
description: > | ||
The account_offers method retrieves a list of offers made by a given account that are outstanding as of a particular ledger version. | ||
type: object | ||
allOf: | ||
- $ref: '../base.yaml#/components/schemas/BaseRequest' | ||
- $ref: '../base.yaml#/components/schemas/LookupByLedgerRequest' | ||
properties: | ||
account: | ||
type: string | ||
description: The unique identifier of an account, typically the account's Address. The request returns a list of NFTs owned by this account. | ||
limit: | ||
type: integer | ||
description: (Optional) Limit the number of token pages to retrieve. Each page can contain up to 32 NFTs. The limit value cannot be lower than 20 or more than 400. Positive values outside this range are replaced with the closest valid option. The default is 100. | ||
marker: | ||
type: string | ||
description: (Optional) Value from a previous paginated response. Resume retrieving data where that response left off. | ||
required: | ||
- account | ||
AccountOffersSuccessResponse: | ||
type: object | ||
properties: | ||
account: | ||
type: string | ||
description: Unique Address identifying the account that made the offers. | ||
offers: | ||
type: array | ||
items: | ||
$ref: '#/components/schemas/Offer' | ||
description: Array of objects, where each object represents an offer made by this account that is outstanding as of the requested ledger version. If the number of offers is large, only returns up to limit at a time. | ||
ledger_current_index: | ||
type: integer | ||
description: (Omitted if ledger_hash or ledger_index provided) The ledger index of the current in-progress ledger version, which was used when retrieving this data. | ||
ledger_index: | ||
type: integer | ||
description: (Omitted if ledger_current_index provided instead) The ledger index of the ledger version that was used when retrieving this data, as requested. | ||
ledger_hash: | ||
type: string | ||
description: (May be omitted) The identifying hash of the ledger version that was used when retrieving this data. | ||
marker: | ||
type: string | ||
description: (May be omitted) Server-defined value indicating the response is paginated. Pass this to the next call to resume where this call left off. Omitted when there are no pages of information after this one. | ||
Offer: | ||
type: object | ||
properties: | ||
flags: | ||
type: integer | ||
description: Options set for this offer entry as bit-flags. | ||
seq: | ||
type: integer | ||
description: Sequence number of the transaction that created this entry. (Transaction sequence numbers are relative to accounts.) | ||
taker_gets: | ||
$ref: '../base.yaml#/components/schemas/CurrencyAmount' | ||
description: The amount the account accepting the offer receives, as a String representing an amount in XRP, or a currency specification object. | ||
taker_pays: | ||
$ref: '../base.yaml#/components/schemas/CurrencyAmount' | ||
description: The amount the account accepting the offer provides, as a String representing an amount in XRP, or a currency specification object. | ||
quality: | ||
type: string | ||
description: The exchange rate of the offer, as the ratio of the original taker_pays divided by the original taker_gets. When executing offers, the offer with the most favorable (lowest) quality is consumed first; offers with the same quality are executed from oldest to newest. | ||
expiration: | ||
type: integer | ||
description: (May be omitted) A time after which this offer is considered unfunded, as the number of seconds since the Ripple Epoch. | ||
|
||
AccountOffersErrorResponse: | ||
description: '' | ||
type: object | ||
properties: | ||
error: | ||
type: string | ||
oneOf: | ||
- $ref: '../base.yaml#/components/schemas/UniversalErrorResponseCodes' | ||
- enum: | ||
- invalidParams | ||
- actNotFound | ||
- lgrNotFound | ||
- actMalformed | ||
description: > | ||
* `invalidParams` - One or more fields are specified incorrectly, or one or more required fields are missing. | ||
* `actNotFound` - The address specified in the `account` field of the request does not correspond to an account in the ledger. | ||
* `lgrNotFound` - The ledger specified by the `ledger_hash` or `ledger_index` does not exist, or it does exist but the server does not have it. | ||
* `actMalformed` - The marker field provided is incorrect. | ||
status: | ||
type: string | ||
enum: | ||
- error | ||
request: | ||
$ref: '#/components/schemas/AccountOffersRequest' | ||
required: | ||
- status | ||
- error | ||
- request |