fragment AccountFields on AccountBalance {
  type
  balance
  market {
    id
  }
  asset {
    id
  }
  party {
    id
  }
}

query Accounts($partyId: ID!) {
  party(id: $partyId) {
    id
    accountsConnection {
      edges {
        node {
          ...AccountFields
        }
      }
    }
  }
}

subscription AccountEvents($partyId: ID) {
  accounts(partyId: $partyId) {
    type
    balance
    assetId
    marketId
    partyId
  }
}
