Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 15 Next »

(Valid for UserApp version 1.5.1)

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

Queries:

 Get KYC Document Types
query KYCDocumentTypes {
    KYCDocumentTypes
}
 Get NonCustodial Currencies
query GetNonCustodialCurrencies {
  currencies {
    id
    name
    precision
    icon_url
    markets(nonCustodialExchangeEnabled: true) {
      id
      rate
      commission_currency
      base_currency_id
      minBaseCurrencyAmount
      base_currency {
        id
        name
        precision
        icon_url
        userBalanceEnable
        currencyPaymentInterfaces(userWithdrawEnabled: true) {
          type
          paymentInterface {
            id
            title
            subtitle
            logoUrl
          }
        }
      }
      quote_currency {
        id
        name
        precision
        icon_url
        userBalanceEnable
        currencyPaymentInterfaces(userWithdrawEnabled: true) {
          type
          paymentInterface {
            id
            title
            subtitle
            logoUrl
          }
        }
      }
      quote_currency_id
      minQuoteCurrencyAmount
      rate
      buy_commission
      buy_max_commission
      buy_min_commission
      sell_commission
      sell_max_commission
      sell_min_commission
      enable_non_custodial_exchange
      swapBaseToQuotePricePrecision
      swapQuoteToBasePricePrecision
    }
    currencyPaymentInterfaces(userDepositEnabled: true) {
      paymentInterfaceId
      type
      paymentInterface {
        id
        title
        logoUrl
        subtitle
        blockchain {
          id
          name
          description
          explorer_address
          chainId
          wallet
        }

      }
      userDepositEnable
      userWithdrawEnable
    }
  }
}

 Get Public Trades History
query GetPublicTradesHistory($market: String) {
  publicTrades(market: $market) {
    result {
      price
      amount
      createdAt
    }
  }
}

 Public OrderBook
query PublicOrderBook($market: String!){
    publicOrderBook(market: $market) {
        buy {
            price
            amount
            cumulativeAmount
        }
        sell {
            price
            amount
            cumulativeAmount
        }
    }
}

 Get Market By Id
query GetMarket($id: String!) {
  market(id: $id) {
    id
    rate
    enable_trading
    quote_currency {
      id
      precision
      icon_url
      name
    }
    base_currency {
      id
      precision
      icon_url
      name
    }
    change24
    trading_min_price
    trading_max_price
    trading_min_amount
    trading_price_precision
    trading_amount_precision
    trading_position
    marketDynamics {
      marketId
      startPrice
      amount24h
      lastPrice
      lowPrice
      highPrice
    }
  }
}

 Get Markets
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
    }
  }
}

 Get User Order
query GetUserOrder($id: String) {
  userOrder(id: $id) {
    id
    status
  }
}

 Get Market Dynamics
query GetMarketDynamics($market: String!) {
  marketDynamics(market: $market) {
    startPrice
    lastPrice
    amount24h
    lowPrice
    highPrice
  }
}

 User Orders
query GetUseOrders($market: String, $status: String, $page: Int, $limit: Int) {
  userOrders(market: $market, status: $status, page: $page, limit: $limit) {
    result {
      id
      market
      Market {
        id
        rate
        enable_trading
        quote_currency {
          id
          precision
          icon_url
          name
        }
        base_currency {
          id
          precision
          icon_url
          name
        }
        change24
        trading_min_price
        trading_max_price
        trading_min_amount
        trading_price_precision
        trading_amount_precision
        marketDynamics {
          marketId
          startPrice
          amount24h
          lastPrice
          lowPrice
          highPrice
        }
      }
      type
      side
      status
      executedAmount
      executedVolume
      user {
        id
      }
      amount
      price
      executedAmount
      executedVolume
      status
      createdAt
    }
    limit
    total
  }
}

 User Trades History
query GetUserTradesHistory($market: String) {
  userTrades(market: $market) {
    result {
      price
      amount
      createdAt
    }
  }
}

 Data For Trading Wallets
query TradeWalletsData($id: String) {
    user(id: $id) {
        currencies {
            id
            advancedTradingBalance
        }
    }
}

 Get 2Fa Status
query Get2FaStatus($id: String) {
  user(id: $id) {
    enabled2fa
  }
}

 Get User History By Id
query GetUserHistoryById($currencyId: String!) {
  history(
    type: "move_to_advanced|move_from_advanced|custodial_withdrawal|custodial_deposit|exchange|deposit|staking_rewards|deposit_reward|trade_reward"
    page: 1
    limit: 4
    currencyId: $currencyId
  ) {
    result {
      id
      createdAt
      status
      initiator_type
      initiator_currency {
        id
        precision
        icon_url
        precision
      }
      initiator_payment_interface {
        title
      }
      initiator_payment_interface_id
      initiator_amount
      initiator_fee
      result_currency {
        id
        precision
        icon_url
        position
      }
      result_payment_interface_id
      result_amount
    }
  }
}

 Get User History
query GetUserHistory(
  $currencyId: String
  $limit: Int
  $page: Int
  $type: String
  $from: String
  $to: String
) {
  history(
    page: $page
    limit: $limit
    currencyId: $currencyId
    type: $type
    from: $from
    to: $to
  ) {
    result {
      id
      createdAt
      status
      initiator_type
      initiator_currency {
        id
        precision
        icon_url
        precision
        currencyPaymentInterfaces {
          type
          paymentInterfaceId
        }
      }
      initiator_payment_interface {
        title
        subtitle
      }
      initiator_payment_interface_id
      initiator_amount
      initiator_explorer_transaction
      initiator_txid
      result_txid
      initiator_fee
      result_currency {
        id
        precision
        icon_url
        position
      }
      result_payment_interface_id
      result_amount
    }
  }
}

 Get User Wallets
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
      }
    }
  }
}
 Get deposit payment interface for selected wallet
query GetDepositWalletPaymentInterface($id: String!) {
  currency(id: $id) {
    currencyPaymentInterfaces {
      userDepositEnable
      userDirectDepositEnabled
      enable
      id
      minDirectDepositAmount
      type
      paymentInterface {
        id
        title
        logoUrl
        subtitle
      }
      currency {
        id
        icon_url
      }
    }
  }
}
 Get withdraw payment interface for selected wallet

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
    }
  }
}
 Get currency for staking
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
  }
}
 Wallet Kline
query WalletHistoryKline(
  $market: String!
  $interval: String!
  $timeFrom: Int!
  $timeTo: Int!
) {
  kline(
    market: $market
    interval: $interval
    timeFrom: $timeFrom
    timeTo: $timeTo
  ) {
    close
    low
    high
    timestamp
    volume
  }
}

 Get User Profile
query GetUpdateUser($id: String) {
  user(id: $id) {
    id
    email
    enabled2fa
    role
    email_verified
    phone_verified
    profile_verified
    documents {
      doc_type
      doc_number
      doc_expire
      url
    }
    state
    token
    labels {
      key
      value
      scope
    }
    createdAt
    updatedAt
    phones {
      id
      phone
      verified
    }
    profiles {
      first_name
      last_name
      birth
      address
      postcode
      city
      country
    }
  }
}

 Get list referrals for user
query GetRefUser {
  refUser {
    id
    refCode
    referralsByLevel {
      level
      count
    }
  }
}
 Get list api keys for user
query GetApiKeys {
  apiKeys {
    id
    description
    scope
    expires
    token
  }
}

Mutations:

 Sign In
mutation SignIn($email: String, $password: String, $code: String) {
  login(email: $email, password: $password, code: $code) {
    id
    enabled2fa
    token
    profiles {
      first_name
      last_name
    }
  }
}
 Sign With Google
mutation SignUpWithGoogle(
  $token: String!
  $code: String
  $referralId: String
) {
  signWithGoogle(
    token: $token
    code: $code
    referralId: $referralId
  ){
    token
    id
    email
  }
}
 Sign Up
mutation SignUp($email: String!, $password: String!, $referralId: String, $locale: String){
    signup(email: $email, password: $password, referralId: $referralId, locale: $locale )
}
 Logout
mutation Logout {
    logout
}
 Change Password
mutation ChangePassword($old_password: String!, $new_password: String!) {
    changePassword(old_password: $old_password, new_password: $new_password)
}

 User Exchange
mutation UserExchange(
    $currencyFrom: String!,
    $currencyTo: String!,
    $amount: Float!,
){
    userExchange(
        fromCurrencyId: $currencyFrom,
        toCurrencyId: $currencyTo,
        amount: $amount
    )
}
 Add User Phone
mutation AddPhone($phone: String!) {
    addPhone(phone: $phone)
}
 Add User Profile
mutation AddProfile($first_name: String!,$last_name: String!,$birth: String!,$address: String!,$city: String!,$country: String!,$postcode: String!) {
    addProfile(first_name: $first_name, last_name: $last_name, birth: $birth,address: $address,city: $city,country: $country, postcode: $postcode)
}
 Resend Email Confirmation
mutation ResendEmailConfirm($email:String!)
{
  resendEmailConfirm(email:$email)
}
 Add User Document
mutation AddUserDocument($doc_type:String!,$doc_number:String!,$file:Upload!,$doc_expire:String!)
{
  addDocument(doc_type:$doc_type,doc_number:$doc_number,file:$file,doc_expire:$doc_expire)
}
 Move Funds From Advanced Trading
mutation MoveFromAdvancedTradingFunds($currencyId: String!, $amount: Float!) {
  moveFromAdvancedTrading(currencyId: $currencyId, amount: $amount)
}
 Move Funds To Advanced Trading
mutation MoveToAdvancedTradingFunds($currencyId: String!, $amount: Float!) {
  moveToAdvancedTrading(currencyId: $currencyId, amount: $amount)
}
 Create NonCustodial Recipient
mutation CreateNonCustodialRecipient(
  $paymentInterfaceId: String!
  $currencyId: String!
  $data: String!
  $description: String!
) {
  createRecipient(
    paymentInterfaceId: $paymentInterfaceId
    currencyId: $currencyId
    data: $data
    description: $description
  ) {
    id
  }
}
 Initiate NonCustodial Exchange (External)
mutation InitNonCustodial(
  $provider: String!
  $inPaymentInterfaceId: String!
  $inCurrencyId: String!
  $amount: Float!
  $slippage: Float!
  $beneficiaryId: String!
) {
  initNonCustodialExternalExchange(
    provider: $provider
    inPaymentInterfaceId: $inPaymentInterfaceId
    inCurrencyId: $inCurrencyId
    amount: $amount
    slippage: $slippage
    beneficiaryId: $beneficiaryId
  )
}
 Initiate NonCustodial Exchange (Classic)
mutation InitNonCustodialClassic(
  $inPaymentInterfaceId: String!
  $inCurrencyId: String!
  $amount: Float!
  $beneficiaryId: String!
) {
  initNonCustodialExchange(
    inPaymentInterfaceId: $inPaymentInterfaceId
    inCurrencyId: $inCurrencyId
    amount: $amount
    beneficiaryId: $beneficiaryId
  ) {
    address
    encodedAddress
    redirectUrl
  }
}
 Ask Change Password
mutation AskChangePassword($email: String!) {
    askChangePassword(email: $email)
}
 Recovery Password
mutation RecoveryPassword($token: String!, $newPassword: String!) {
    recoveryPassword(token: $token, newPassword: $newPassword)
}
 Cancel Order
mutation CancelOrderAction($id: String!) {
  cancelOrder(id: $id)
}

 Create Order
mutation CreateOrder(
  $market: String!
  $side: String!
  $type: String!
  $price: Float
  $amount: Float!
) {
  openOrder(
    market: $market
    side: $side
    type: $type
    price: $price
    amount: $amount
  ) {
    id
    status
  }
}

 Request 2FA
mutation Request2FA{
    request2FA
}

 Turn On 2FA
mutation TurnOn2FA($code: String!) {
  turnOn2FA(code: $code)
}

 Verify Email
mutation VerifyEmailToken($token: String!, $isFront: Boolean) {
  verifyEmail(token: $token, isFront: $isFront)
}

 Verify User Phone
mutation VerifyUserPhoneNumber($phone:String!,$code:String!){
  verifyPhone(phone:$phone,code:$code)
}

 Create Recipient (used in withdrawal)
mutation createRecipient($paymentInterfaceId:String!, $currencyId: String!, $data: String!, $description: String!) {
    createRecipient(
        paymentInterfaceId: $paymentInterfaceId,
        currencyId: $currencyId,
        data: $data,
        description: $description
    ) {
        id
    }
}

 Create Withdrawal
mutation CreateWithdrawal(
  $recipient_id: String
  $amount: Float
  $code: String
  $includeFees: Boolean
) {
  userWithdraw(
    recipientId: $recipient_id
    amount: $amount
    code: $code
    includeFees: $includeFees
  )
}

 Confirmation Connect Wallet (WalletConnect functionality)
mutation ConfirmationConnectWallet($paymentInterfaceId: String,$address: String!){
  connectWallet_v1(
    paymentInterfaceId: $paymentInterfaceId,
    address: $address) {
    id
  }
}

 Generate Deposit Address
mutation GenerateDepositAddress(
  $currencyId: String!
  $paymentInterfaceId: String!
  $isDonation: Boolean!
) {
  generateWallet(
    currencyId: $currencyId
    paymentInterfaceId: $paymentInterfaceId
    isDonation: $isDonation
  ) {
    id
    type
    paymentInterface {
      id
      title
      logoUrl
      subtitle
    }
    currency {
      id
      icon_url
    }
    deposit {
      address
      encodedAddress
      redirectUrl
      depositCommission
      minDepositCommission
      maxDepositCommission
      minDepositAmount
      maxDepositAmount
    }
  }
}

 get Url WalletConnect
mutation getUrlWalletConnect{
  getWalletConnectURI_v1
}

 Make Deposit Request
mutation SendDepositRequest($paymentInterfaceId: String!,$address: String!,$currencyId: String!,$amount: Float!){
    userDirectDeposit(
        paymentInterfaceId:$paymentInterfaceId,
        type: DIRECT_DEPOSIT,
        address: $address,
        currencyId: $currencyId,
        amount:$amount
    )
}

 Generate fiat address for selected wallet
mutation FiatGenerateWallet(
  $currencyId: String!
  $paymentInterfaceId: String!
  $isDonation: Boolean!
) {
  generateWallet(
    currencyId: $currencyId
    paymentInterfaceId: $paymentInterfaceId
    isDonation: $isDonation
  ) {
    deposit {
      address
      encodedAddress
    }
  }
}
 Enter Stake/ Top-up Stake Currency
mutation CreateCurrencyState($currencyId: String!, $amount: Float!) {
  createStake(currencyId: $currencyId, amount: $amount)
}
 Unstake Currency
mutation CancelCurrencyState($currencyId: String!) {
  cancelStake(currencyId: $currencyId)
}
 Create API key for user
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
  }
}
 Delete user's API key
mutation DeleteApiKeyAction($id: String! $otp_code: String) {
  deleteApiKey(id: $id otp_code: $otp_code)
}
 Cancel all orders
mutation CancelAllOrders($market: String!) {
  cancelAllOrders(market: $market)
}

Subscriptions:

 Public Trades
subscription PublicTradesSubscription($market: String!){
    publicTrades(market: $market) {
        price
        amount
        createdAt
    }
}

 Market Dynamics
subscription MarketDynamics($market: String){
    marketDynamics(market: $market){
        marketId
        startPrice
        lastPrice
        amount24h
        lowPrice
        highPrice
    }
}

 Public Diff OrderBook
subscription PublicDiffOrderBookSubscription($market: String!){
    publicDiffOrderBook(market: $market){
        buy {
            price
            amountDiff
        }
        sell {
            price
            amountDiff
        }
    }
}

 Public Full OrderBook
subscription PublicFullOrderBookSubscription($market: String!){
    publicFullOrderBook(market: $market) {
        buy {
            price
            amount
            cumulativeAmount
        }
        sell {
            price
            amount
            cumulativeAmount
        }
    }
}

 Private Orders
subscription PrivateOrdersSubscription($market:String!,$token: String!){
    privateOrders(market: $market, token:$token){
        id
        market
        type
        side
        status
        executedAmount
        executedVolume
        user {
            id
        }
        amount
        price
        executedAmount
        executedVolume
        status
        createdAt
    }
}

 Private Trades
subscription GetPrivateTrades($market: String,$token: String!) {
  privateTrades(
    market: $market,
    token: $token
  ){
    id
    amount
    price
    side
    role
  }
}

 Market Rate
subscription MarketRate($market: String!){
    marketRate(market: $market){
        market,
        rate,
        ts
    }
}

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

  • No labels