This repository has been archived by the owner on Mar 31, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add protos to support margin level pagination with cursor (#432)
- Loading branch information
Showing
7 changed files
with
960 additions
and
257 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
43 changes: 43 additions & 0 deletions
43
generated/json/data-node/api/v2/GetMarginLevelsRequest.json
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,43 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"$ref": "#/definitions/GetMarginLevelsRequest", | ||
"definitions": { | ||
"GetMarginLevelsRequest": { | ||
"properties": { | ||
"party_id": { | ||
"type": "string" | ||
}, | ||
"market_id": { | ||
"type": "string" | ||
}, | ||
"pagination": { | ||
"$ref": "#/definitions/datanode.api.v2.Pagination", | ||
"additionalProperties": true | ||
} | ||
}, | ||
"additionalProperties": true, | ||
"type": "object", | ||
"title": "Get Margin Levels Request" | ||
}, | ||
"datanode.api.v2.Pagination": { | ||
"properties": { | ||
"first": { | ||
"type": "integer" | ||
}, | ||
"after": { | ||
"type": "string" | ||
}, | ||
"last": { | ||
"type": "integer" | ||
}, | ||
"before": { | ||
"type": "string" | ||
} | ||
}, | ||
"additionalProperties": true, | ||
"type": "object", | ||
"title": "Pagination", | ||
"description": "Cursor information for cursor based pagination requests" | ||
} | ||
} | ||
} |
111 changes: 111 additions & 0 deletions
111
generated/json/data-node/api/v2/GetMarginLevelsResponse.json
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,111 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"$ref": "#/definitions/GetMarginLevelsResponse", | ||
"definitions": { | ||
"GetMarginLevelsResponse": { | ||
"properties": { | ||
"margin_levels": { | ||
"$ref": "#/definitions/datanode.api.v2.MarginConnection", | ||
"additionalProperties": true | ||
} | ||
}, | ||
"additionalProperties": true, | ||
"type": "object", | ||
"title": "Get Margin Levels Response" | ||
}, | ||
"datanode.api.v2.MarginConnection": { | ||
"properties": { | ||
"total_count": { | ||
"type": "string" | ||
}, | ||
"edges": { | ||
"items": { | ||
"$ref": "#/definitions/datanode.api.v2.MarginEdge" | ||
}, | ||
"type": "array" | ||
}, | ||
"page_info": { | ||
"$ref": "#/definitions/datanode.api.v2.PageInfo", | ||
"additionalProperties": true | ||
} | ||
}, | ||
"additionalProperties": true, | ||
"type": "object", | ||
"title": "Margin Connection" | ||
}, | ||
"datanode.api.v2.MarginEdge": { | ||
"properties": { | ||
"node": { | ||
"$ref": "#/definitions/vega.MarginLevels", | ||
"additionalProperties": true | ||
}, | ||
"cursor": { | ||
"type": "string" | ||
} | ||
}, | ||
"additionalProperties": true, | ||
"type": "object", | ||
"title": "Margin Edge" | ||
}, | ||
"datanode.api.v2.PageInfo": { | ||
"properties": { | ||
"has_next_page": { | ||
"type": "boolean" | ||
}, | ||
"has_previous_page": { | ||
"type": "boolean" | ||
}, | ||
"start_cursor": { | ||
"type": "string" | ||
}, | ||
"end_cursor": { | ||
"type": "string" | ||
} | ||
}, | ||
"additionalProperties": true, | ||
"type": "object", | ||
"title": "Page Info", | ||
"description": "Page information for cursor based pagination" | ||
}, | ||
"vega.MarginLevels": { | ||
"properties": { | ||
"maintenance_margin": { | ||
"type": "string", | ||
"description": "Maintenance margin value" | ||
}, | ||
"search_level": { | ||
"type": "string", | ||
"description": "Search level value" | ||
}, | ||
"initial_margin": { | ||
"type": "string", | ||
"description": "Initial margin value" | ||
}, | ||
"collateral_release_level": { | ||
"type": "string", | ||
"description": "Collateral release level value" | ||
}, | ||
"party_id": { | ||
"type": "string", | ||
"description": "Party identifier" | ||
}, | ||
"market_id": { | ||
"type": "string", | ||
"description": "Market identifier" | ||
}, | ||
"asset": { | ||
"type": "string", | ||
"description": "Asset identifier" | ||
}, | ||
"timestamp": { | ||
"type": "string", | ||
"description": "Timestamp for the time the ledger entry was created, in nanoseconds since the epoch - See [`VegaTimeResponse`](#api.VegaTimeResponse).`timestamp`" | ||
} | ||
}, | ||
"additionalProperties": true, | ||
"type": "object", | ||
"title": "Margin Levels", | ||
"description": "Represents the margin levels for a party on a market at a given time" | ||
} | ||
} | ||
} |
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,100 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"$ref": "#/definitions/MarginConnection", | ||
"definitions": { | ||
"MarginConnection": { | ||
"properties": { | ||
"total_count": { | ||
"type": "string" | ||
}, | ||
"edges": { | ||
"items": { | ||
"$ref": "#/definitions/datanode.api.v2.MarginEdge" | ||
}, | ||
"type": "array" | ||
}, | ||
"page_info": { | ||
"$ref": "#/definitions/datanode.api.v2.PageInfo", | ||
"additionalProperties": true | ||
} | ||
}, | ||
"additionalProperties": true, | ||
"type": "object", | ||
"title": "Margin Connection" | ||
}, | ||
"datanode.api.v2.MarginEdge": { | ||
"properties": { | ||
"node": { | ||
"$ref": "#/definitions/vega.MarginLevels", | ||
"additionalProperties": true | ||
}, | ||
"cursor": { | ||
"type": "string" | ||
} | ||
}, | ||
"additionalProperties": true, | ||
"type": "object", | ||
"title": "Margin Edge" | ||
}, | ||
"datanode.api.v2.PageInfo": { | ||
"properties": { | ||
"has_next_page": { | ||
"type": "boolean" | ||
}, | ||
"has_previous_page": { | ||
"type": "boolean" | ||
}, | ||
"start_cursor": { | ||
"type": "string" | ||
}, | ||
"end_cursor": { | ||
"type": "string" | ||
} | ||
}, | ||
"additionalProperties": true, | ||
"type": "object", | ||
"title": "Page Info", | ||
"description": "Page information for cursor based pagination" | ||
}, | ||
"vega.MarginLevels": { | ||
"properties": { | ||
"maintenance_margin": { | ||
"type": "string", | ||
"description": "Maintenance margin value" | ||
}, | ||
"search_level": { | ||
"type": "string", | ||
"description": "Search level value" | ||
}, | ||
"initial_margin": { | ||
"type": "string", | ||
"description": "Initial margin value" | ||
}, | ||
"collateral_release_level": { | ||
"type": "string", | ||
"description": "Collateral release level value" | ||
}, | ||
"party_id": { | ||
"type": "string", | ||
"description": "Party identifier" | ||
}, | ||
"market_id": { | ||
"type": "string", | ||
"description": "Market identifier" | ||
}, | ||
"asset": { | ||
"type": "string", | ||
"description": "Asset identifier" | ||
}, | ||
"timestamp": { | ||
"type": "string", | ||
"description": "Timestamp for the time the ledger entry was created, in nanoseconds since the epoch - See [`VegaTimeResponse`](#api.VegaTimeResponse).`timestamp`" | ||
} | ||
}, | ||
"additionalProperties": true, | ||
"type": "object", | ||
"title": "Margin Levels", | ||
"description": "Represents the margin levels for a party on a market at a given time" | ||
} | ||
} | ||
} |
Oops, something went wrong.