Decentralized Trading Platform API
Documentation for Blockparty Decentralized Trading Platform GraphQL API
Queries
admittedBrokers
Response
Returns an AdmittedBrokerList!
Arguments
| Name | Description |
|---|---|
|
Default = |
|
Default = |
|
|
|
|
|
Example
Query
query admittedBrokers(
$first: Int,
$skip: Int,
$where: AdmittedBrokerFilter,
$orderBy: AdmittedBrokerOrderBy,
$ordering: Ordering
) {
admittedBrokers(
first: $first,
skip: $skip,
where: $where,
orderBy: $orderBy,
ordering: $ordering
) {
numEntries
cursor
entries {
...BrokerAdmissionFragment
}
}
}
Variables
{
"first": 10,
"skip": 0,
"where": AdmittedBrokerFilter,
"orderBy": "ACCOUNT",
"ordering": "ASC"
}
coreEvents
Response
Returns a CoreEventList!
Arguments
| Name | Description |
|---|---|
|
Default = |
|
Default = |
|
|
|
|
|
Example
Query
query coreEvents(
$first: Int,
$skip: Int,
$where: CoreEventFilter,
$orderBy: CoreEventOrderBy,
$ordering: Ordering
) {
coreEvents(
first: $first,
skip: $skip,
where: $where,
orderBy: $orderBy,
ordering: $ordering
) {
numEntries
cursor
entries {
... on SwapMadeCoreEvent {
...SwapMadeCoreEventFragment
}
... on SwapTakenCoreEvent {
...SwapTakenCoreEventFragment
}
... on SwapDroppedCoreEvent {
...SwapDroppedCoreEventFragment
}
... on SwapCurrencyAmendedCoreEvent {
...SwapCurrencyAmendedCoreEventFragment
}
... on SwapBrokeredCoreEvent {
...SwapBrokeredCoreEventFragment
}
... on BrokeredSwapJoinedCoreEvent {
...BrokeredSwapJoinedCoreEventFragment
}
... on BrokeredSwapUnjoinedCoreEvent {
...BrokeredSwapUnjoinedCoreEventFragment
}
... on BrokeredSwapDroppedCoreEvent {
...BrokeredSwapDroppedCoreEventFragment
}
... on DepositedTreasuryEvent {
...DepositedTreasuryEventFragment
}
... on WithdrawnTreasuryEvent {
...WithdrawnTreasuryEventFragment
}
... on BookedTreasuryEvent {
...BookedTreasuryEventFragment
}
... on SpentTreasuryEvent {
...SpentTreasuryEventFragment
}
}
}
}
Variables
{
"first": 10,
"skip": 0,
"where": CoreEventFilter,
"orderBy": "BLOCK_TIME",
"ordering": "ASC"
}
swap
Response
Returns a Swap
Arguments
| Name | Description |
|---|---|
|
Example
Query
query swap($id: UInt256!) {
swap(id: $id) {
id
dex {
...DEXFragment
}
transaction {
...TransactionFragment
}
event {
... on SwapMadeCoreEvent {
...SwapMadeCoreEventFragment
}
... on SwapTakenCoreEvent {
...SwapTakenCoreEventFragment
}
... on SwapDroppedCoreEvent {
...SwapDroppedCoreEventFragment
}
... on SwapCurrencyAmendedCoreEvent {
...SwapCurrencyAmendedCoreEventFragment
}
... on SwapBrokeredCoreEvent {
...SwapBrokeredCoreEventFragment
}
... on BrokeredSwapJoinedCoreEvent {
...BrokeredSwapJoinedCoreEventFragment
}
... on BrokeredSwapUnjoinedCoreEvent {
...BrokeredSwapUnjoinedCoreEventFragment
}
... on BrokeredSwapDroppedCoreEvent {
...BrokeredSwapDroppedCoreEventFragment
}
}
status
escrow
expiration
broker
isLastVersion
lastVersion {
...SwapFragment
}
nextVersion {
...SwapFragment
}
previousVersion {
...SwapFragment
}
versions {
...SwapFragment
}
sideA {
...SwapSideFragment
}
sideB {
...SwapSideFragment
}
accessList {
...SwapAccessItemFragment
}
joinedSide
expired
}
}
Response
{
"data": {
"swap": {
"id": UInt256,
"dex": DEX,
"transaction": Transaction,
"event": SwapMadeCoreEvent,
"status": "OPEN",
"escrow": false,
"expiration": UInt256,
"broker": "xyz789",
"isLastVersion": false,
"lastVersion": Swap,
"nextVersion": Swap,
"previousVersion": Swap,
"versions": [Swap],
"sideA": SwapSide,
"sideB": SwapSide,
"accessList": [SwapAccessItem],
"joinedSide": "A",
"expired": true
}
}
}
swaps
Response
Returns a SwapList!
Arguments
| Name | Description |
|---|---|
|
Default = |
|
Default = |
|
|
|
|
|
transaction
Response
Returns a Transaction
Arguments
| Name | Description |
|---|---|
|
Example
Query
query transaction($hash: String!) {
transaction(hash: $hash) {
hash
address
blockNum
index
blockTime
confirmations
events {
... on SwapMadeCoreEvent {
...SwapMadeCoreEventFragment
}
... on SwapTakenCoreEvent {
...SwapTakenCoreEventFragment
}
... on SwapDroppedCoreEvent {
...SwapDroppedCoreEventFragment
}
... on SwapCurrencyAmendedCoreEvent {
...SwapCurrencyAmendedCoreEventFragment
}
... on SwapBrokeredCoreEvent {
...SwapBrokeredCoreEventFragment
}
... on BrokeredSwapJoinedCoreEvent {
...BrokeredSwapJoinedCoreEventFragment
}
... on BrokeredSwapUnjoinedCoreEvent {
...BrokeredSwapUnjoinedCoreEventFragment
}
... on BrokeredSwapDroppedCoreEvent {
...BrokeredSwapDroppedCoreEventFragment
}
... on DepositedTreasuryEvent {
...DepositedTreasuryEventFragment
}
... on WithdrawnTreasuryEvent {
...WithdrawnTreasuryEventFragment
}
... on BookedTreasuryEvent {
...BookedTreasuryEventFragment
}
... on SpentTreasuryEvent {
...SpentTreasuryEventFragment
}
}
swap {
...SwapFragment
}
}
}
transactions
Response
Returns a TransactionList!
Arguments
| Name | Description |
|---|---|
|
Default = |
|
Default = |
|
|
|
|
|
Types
AdmittedBrokerList
Fields
| Field Name | Description |
|---|---|
|
|
|
|
|
BookedTreasuryEvent
Fields
| Field Name | Description |
|---|---|
|
|
|
|
|
|
|
|
|
BrokeredSwapDroppedCoreEvent
Fields
| Field Name | Description |
|---|---|
|
|
|
|
|
BrokeredSwapJoinedCoreEvent
Fields
| Field Name | Description |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BrokeredSwapUnjoinedCoreEvent
Fields
| Field Name | Description |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
CoreEventList
Fields
| Field Name | Description |
|---|---|
|
|
|
|
|
CoreEventType
Values
| Enum Value | Description |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CurrencyComponent
Fields
| Field Name | Description |
|---|---|
|
|
|
|
|
DepositedTreasuryEvent
Fields
| Field Name | Description |
|---|---|
|
|
|
|
|
|
|
|
|
ERC1155Component
Fields
| Field Name | Description |
|---|---|
|
|
|
|
|
|
|
|
|
ERC20Component
Fields
| Field Name | Description |
|---|---|
|
|
|
|
|
|
|
ERC721Component
Fields
| Field Name | Description |
|---|---|
|
|
|
|
|
|
|
|
|
Int
SpentTreasuryEvent
Fields
| Field Name | Description |
|---|---|
|
|
|
|
|
|
|
|
|
String
Swap
Fields
| Field Name | Description |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Example
{
"id": UInt256,
"dex": DEX,
"transaction": Transaction,
"event": SwapMadeCoreEvent,
"status": "OPEN",
"escrow": true,
"expiration": UInt256,
"broker": "xyz789",
"isLastVersion": true,
"lastVersion": Swap,
"nextVersion": Swap,
"previousVersion": Swap,
"versions": [Swap],
"sideA": SwapSide,
"sideB": SwapSide,
"accessList": [SwapAccessItem],
"joinedSide": "A",
"expired": false
}
SwapBrokeredCoreEvent
Fields
| Field Name | Description |
|---|---|
|
|
|
|
|
SwapCurrencyAmendedCoreEvent
Fields
| Field Name | Description |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
SwapDroppedCoreEvent
Fields
| Field Name | Description |
|---|---|
|
|
|
|
|
SwapFilter
Fields
| Input Field | Description |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Example
{
"status": "OPEN",
"status_in": ["OPEN"],
"broker": "xyz789",
"broker_like": "abc123",
"brokerCanJoin": "abc123",
"sideASender": "xyz789",
"sideASender_like": "abc123",
"sideBSender": "abc123",
"sideBSender_like": "xyz789",
"eitherSideSender": "abc123",
"eitherSideSender_like": "abc123",
"accountCanJoin": "xyz789",
"accessList_empty": true,
"accessList_has": "abc123",
"accessList_empty_or_has": "abc123",
"expired": true
}
SwapMadeCoreEvent
Fields
| Field Name | Description |
|---|---|
|
|
|
|
|
|
|
SwapSide
Fields
| Field Name | Description |
|---|---|
|
|
|
|
|
|
|
|
|
SwapTakenCoreEvent
Fields
| Field Name | Description |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
Transaction
Fields
| Field Name | Description |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TransactionFilter
Fields
| Input Field | Description |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
TransactionList
Fields
| Field Name | Description |
|---|---|
|
|
|
|
|
WithdrawnTreasuryEvent
Fields
| Field Name | Description |
|---|---|
|
|
|
|
|
|
|
|
|