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 12 Next »

(Valid for UserApp version 1.4.0)

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

1. Query for Public Order Book (ETH-USDT)

query {publicOrderBook(market:"ETH-USDT"){

sell{
amount
price
cumulativeAmount}

buy {
amount
price
cumulativeAmount
}
}
}

2. Query for Market Dynamics data:

query {marketDynamics (market:"ETH-USDT"){
marketId
startPrice
lastPrice
lowPrice
highPrice
change24
amount24h
}
}

3. Query for Public Trades History:

query {
publicTrades(market: "ETH-USDT") {
result {
price
amount
createdAt
}
}
}

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
    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) {
  userOrders(market: $market, status: $status, page: 1, limit: 1000) {
    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
    }
  }
}

 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"
    page: 1
    limit: 5
    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 {
  history(
    type: "move_to_advanced|move_from_advanced|custodial_withdrawal|custodial_deposit|exchange|trading"
    page: 1
    limit: 5000
  ) {
    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
      balance
      advancedTradingBalance
      advancedTradingLockedBalance
      lightBgColor1
      lightBgColor2
      darkBgColor1
      darkBgColor2
      lightTextColor
      currencyPaymentInterfaces {
        userDepositEnable
        userDirectDepositEnabled
        id
        type
        paymentInterface {
          id
          title
          logoUrl
          subtitle
        }
        currency {
          id
          icon_url
        }
      }
      withdrawPaymentInterfaces {
        type
        paymentInterface {
          id
          title
          logoUrl
          subtitle
        }
        currency {
          id
          name
          icon_url
        }
        beneficiaries {
          id
          data
          description
        }
        minWithdrawAmount
        maxWithdrawAmount
        withdrawFee
        minWithdrawFee
        maxWithdrawFee
        maxWithdrawAmount24h
        maxWithdrawAmount72h
        withdrawAmount24h
        withdrawAmount72h
      }
      markets {
        id
        base_currency {
          id
          name
          icon_url
          balance
          precision
          advancedTradingBalance
          userBalanceEnable
        }
        quote_currency {
          id
          name
          icon_url
          balance
          precision
          advancedTradingBalance
          userBalanceEnable
        }
        rate
        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
      }
    }
  }
}

 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
        }

}
}

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!
  $referralId: String
) {
  signWithGoogle(
    token: $token
    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
    )
}

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 Balance
subscription GetUserBalanceUpdated($token: String!) 
{
  userBalanceUpdated(token:$token)
  {
    currencyId
    balance
    advancedTradingLockedBalance
    advancedTradingBalance
    ts
  }
}

 getDetailsConnectionToWallet (WalletConnect functionality)
subscription getDetailsConnectionToWallet($token: String!){
  walletToConnect_v1(token:
$token)
   {
      address
      chainId
      action
      paymentInterface{
          id 
      }
   } 
}

  • No labels