Portfolio margin
Installation
- Maven
- Gradle
pom.xml
<dependency>
<groupId>{{groupId}}</groupId>
<artifactId>{{artifactId}}</artifactId>
<version>{{version}}</version>
</dependency>
build.gradle
implementation '{{groupId}}:{{artifactId}}:{{version}}'
Client instantiation
PortfolioMarginClient client = new PortfolioMarginClient(key, secret);
Features
Get account infos
- Sync
- Async
try{
AccountInfo res = client.getAccountInfo().sync();
}catch(ApiException e){
//...
}
client.getAccountInfo().async((response, exception) -> {
if(exception == null){
//...
}else{
//...
}
});
Get collateral rate
- Sync
- Async
try{
List<CollaterateRateInfo> res = client.getCollateralRate().sync();
}catch(ApiException e){
//...
}
client.getCollateralRate().async((response, exception) -> {
if(exception == null){
//...
}else{
//...
}
});