All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.knowm.xchange.examples.bitflyer.account.BitflyerAccountDemo Maven / Gradle / Ivy

Go to download

Provides a set of examples that demonstrate how to use XChange in client applications

The newest version!
package org.knowm.xchange.examples.bitflyer.account;

import java.io.IOException;
import java.util.List;
import org.knowm.xchange.Exchange;
import org.knowm.xchange.bitflyer.dto.account.BitflyerMarginAccount;
import org.knowm.xchange.bitflyer.dto.account.BitflyerMarginStatus;
import org.knowm.xchange.bitflyer.dto.account.BitflyerMarginTransaction;
import org.knowm.xchange.bitflyer.service.BitflyerAccountServiceRaw;
import org.knowm.xchange.examples.bitflyer.BitflyerDemoUtils;
import org.knowm.xchange.service.account.AccountService;

public class BitflyerAccountDemo {

  public static void main(String[] args) throws IOException {

    Exchange exchange = BitflyerDemoUtils.createExchange();
    AccountService accountService = exchange.getAccountService();

    marginInfo(accountService);
  }

  private static void marginInfo(AccountService accountService) throws IOException {
    // Get the margin information
    BitflyerAccountServiceRaw accountServiceRaw = (BitflyerAccountServiceRaw) accountService;

    List marginAccounts = accountServiceRaw.getBitflyerMarginAccounts();
    System.out.println("Margin infos response: " + marginAccounts);

    BitflyerMarginStatus marginStatus = accountServiceRaw.getBitflyerMarginStatus();
    System.out.println(marginStatus);

    List marginHistory = accountServiceRaw.getBitflyerMarginHistory();
    System.out.println(marginHistory);
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy