Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

(Valid for UserApp version 1.5.03)

URL for Playground https://dev.wizwiz.io/graphql

You can know more about GraphQL in Marionette in this video

Queries:

Expand
titleGet KYC Document Types
Code Block
query KYCDocumentTypes {
    KYCDocumentTypes
}

...

Expand
titleGet Markets
Code Block
query GetMarkets {
  markets {
    id
    rate
    enable_trading
    quote_currency {
      id
      precision
      icon_url
      name
      userBalanceEnable
    }
    base_currency {
      id
      precision
      icon_url
      name
      userBalanceEnable
    }
    change24
    isFavorite
    trading_min_price
    trading_max_price
    trading_min_amount
    trading_price_precision
    trading_amount_precision
    trading_position
    marketDynamics{
      marketId
      startPrice
      amount24h
      lastPrice
      lowPrice
      highPrice
    }
  }
}

...

Expand
titleGet User Wallets
Code Block
query GetUserWallets($id: String) {
  user(id: $id) {
    currencies {
      id
      name
      icon_url
      position
      precision
      enabled
      lightBgColor1
      lightBgColor2
      darkBgColor1
      darkBgColor2
      lightTextColor
      staking_enabled
      isUnstakingProcess
      isFavorite
      markets {
        id
        marketDynamics {
          marketId
          startPrice
          amount24h
          lastPrice
          lowPrice
          highPrice
        }
        base_currency {
          id
          name
          icon_url
          balance
          precision
          advancedTradingBalance
          userBalanceEnable
        }
        quote_currency {
          id
          name
          icon_url
          balance
          precision
          advancedTradingBalance
          userBalanceEnable
        }
        rate
        isFavorite
        minBaseCurrencyAmount
        minQuoteCurrencyAmount
        commission_currency
        buy_commission
        buy_min_commission
        buy_max_commission
        sell_commission
        sell_min_commission
        sell_max_commission
        buy_commission
        buy_max_commission
        buy_min_commission
        sell_commission
        sell_max_commission
        sell_min_commission
        enable_custodial_exchange
        enabled
        swapBaseToQuotePricePrecision
        swapQuoteToBasePricePrecision
        enable_trading
        trading_min_amount
        trading_price_precision
        trading_amount_precision
      }
    }
  }
}
Expand
titleGet deposit payment interface for selected wallet
Code Block
query GetDepositWalletPaymentInterface($id: String!) {
  currency(id: $id) {
    currencyPaymentInterfaces {
      userDepositEnable
      userDirectDepositEnabled
      enable
      id
      minDirectDepositAmount
      type
      paymentInterface {
        id
        title
        logoUrl
        subtitle
      }
      currency {
        id
        icon_url
      }
    }
  }
}
Expand
titleGet withdraw payment interface for selected wallet

Code Block
query GetWithdrawWalletPaymentInterface($id: String!) {
  currency(id: $id) {
    withdrawPaymentInterfaces {
      type
      paymentInterface {
        id
        title
        logoUrl
        subtitle
      }
      currency {
        id
        name
        icon_url
      }
      recipients {
        id
        data
        description
      }
      recipientSchema
      minWithdrawAmount
      maxWithdrawAmount
      withdrawFee
      minWithdrawFee
      maxWithdrawFee
      maxWithdrawAmount24h
      withdrawAmount24h
    }
  }
}

expand
Expand
titleGet currency for staking
Code Block
query GetStakingCurrency($id: String!) {
  stakingCurrency(id: $id) {
    id
    staking_enabled
    staking_period
    staking_apr
    last_staking_calc
    next_staking_calc
    next_reward_amount
    locked_balance
    active_balance
    min_staking_amount
    isUnstakingProcess
  }
}

...

Expand
titleGenerate fiat address for select selected wallet
Code Block
mutation FiatGenerateWallet(
  $currencyId: String!
  $paymentInterfaceId: String!
  $isDonation: Boolean!
) {
  generateWallet(
    currencyId: $currencyId
    paymentInterfaceId: $paymentInterfaceId
    isDonation: $isDonation
  ) {
    deposit {
      address
      encodedAddress
    }
  }
}
Expand
titleCreate stake operation for wallet Enter Stake/ Top-up Stake Currency
Code Block
mutation CreateCurrencyState($currencyId: String!, $amount: Float!) {
  createStake(currencyId: $currencyId, amount: $amount)
}
Expand
titleCancel stake operation for wallet Unstake Currency
Code Block
mutation CancelCurrencyState($currencyId: String!) {
  cancelStake(currencyId: $currencyId)
}
Expand
titleCreate api API key for user
Code Block
mutation CreateUserApiKey(
  $description: String
  $expires: Int!
  $scope: String
  $otp_code: String
) {
  createApiKey(
    description: $description
    expires: $expires
    scope: $scope
    otp_code: $otp_code
  ){
    id
    description
    scope
    expires
    token
  }
}
Expand
titleDelete api key for useruser's API key
Code Block
mutation DeleteApiKeyAction($id: String! $otp_code: String) {
  deleteApiKey(id: $id otp_code: $otp_code)
}
Expand
titleCancel all orders
Code Block
mutation CancelAllOrders($market: String!) {
  cancelAllOrders(market: $market)
}

Subscriptions:

Expand
titlePublic Trades
Code Block
subscription PublicTradesSubscription($market: String!){
    publicTrades(market: $market) {
        price
        amount
        createdAt
    }
}

...

Expand
titleMarket Rate
Code Block
subscription MarketRate($market: String!){
    marketRate(market: $market){
        market,
        rate,
        ts
    }
}

Expand
titleUser balance 's balances for all wallets
Code Block
subscription UserAllBalance($token: String!) {
  userAllBalance(token: $token) {
    currencyId
    balance
    lockedBalance
    advancedTradingBalance
    advancedTradingLockedBalance
    withdrawLockedBalance
    stakingLockedBalance
    activeStakingBalance
    ts
  }
}