gateapi-java's People
Forkers
logi001 be1ongs a454892215 wodaoaicc chen226 leijiangping hello-dake taolizao chenglongyin innerpeacexxxx loveyandex dsynewgithub micromingle eotlr0806 luchangquan6 rodrigoieh noumanalisyed leehaoge dabldev amaz1208 investidordesucesso c375002707 hietknt mainbloq wayruha wexa dashbaord202401 amumuku duke8gateapi-java's Issues
Failed to resolve: io.gate:gate-api:4.11.0
我在gradle 加了配置: implementation "io.gate:gate-api:4.11.0" 但是一直提示 implementation "io.gate:gate-api:4.11.0"
我的仓库地址配置
allprojects {
repositories {
// maven{url 'http://maven.aliyun.com/nexus/content/groups/public/'}
maven{url 'file:D:\work\projects\Common\androidAppUtil\repository'}
maven{url 'D:\work\projects\Common\Common\repository'}
google()
jcenter()
mavenCentral()
maven{url 'https://jitpack.io'}
maven {
url "https://maven.google.com" // Google's Maven repository
}
}
}
提现接口
调提现接口会发短信提示被安全审核,app里提现就不会这样
传了address、currency、amount、chain,4个参数,是少传了什么参数还是因为是新地址,或者换ip的问题触发了安全审核?怎样可以避免呢?
使用example列子请求报错
Unable to make field private java.lang.String java.lang.Throwable.detailMessage accessible: module java.base does not "opens java.lang" to unnamed module @437da279
How set market order by API?
Cannot find type Market in enum:
public enum TypeEnum {
LIMIT("limit");
}
Try set market order buy:
// ********************************************
// open by market BUY
// ********************************************
Order order = new Order();
order.setAccount(Order.AccountEnum.fromValue("spot"));
order.setAutoBorrow(false);
order.setTimeInForce(Order.TimeInForceEnum.GTC);
order.setType(null); // how set market ???
order.setAmount("243.9");
order.setPrice(null);
order.setSide(Order.SideEnum.BUY);
order.setCurrencyPair("WALLET_USDT");
Order created = spotApi.createOrder(order);
System.out.printf("order created with id %s, status %s\n", created.getId(), created.getStatus());
but this does not work, it requires you to set a price, but when buying from the market, the price is not needed.
关于批量下单batchOrder
当批量下单时,如果是type=market . batchOrder 里是没有avgDealPrice的.amount也拿不到成交的代币数量.这样有些不方便,请问是否会改进这一点?
以上
谢谢.
Unexpected Behavior of Amount Parameter in Spot (in v6.57.0)
Problem Summary:
When creating a create order(type=market) and specifying a certain amount in the amount parameter, the order seems to execute as a $15 USDT transaction instead of fulfilling the specified amount of 15 units.
Reproduction Steps:
Sent a request to create a market order with the following details:
{
"currencyPair": "RBN_USDT",
"type": "market",
"account": "spot",
"side": "buy",
**"amount": 15,**
"price": null,
"timeInForce": "fok",
"iceberg": 0,
"autoBorrow": false
}
class Order {
text: apiv4
amendText: -
createTime: 1710584768
updateTime: 1710584768
createTimeMs: 1710584768511
updateTimeMs: 1710584768511
status: closed
currencyPair: RBN_USDT
type: market
**account: spot**
**side: buy**
**amount: 15**
price: 0
timeInForce: fok
iceberg: 0
autoBorrow: null
autoRepay: null
left: 0.011427
**fillPrice: 14.988573**
filledTotal: 14.988573
avgDealPrice: 1.47962222
fee: 0
feeCurrency: RBN
pointFee: 0
gtFee: 0.00185570777145296712
gtMakerFee: 0
gtTakerFee: 0.00087
gtDiscount: true
rebatedFee: 0
rebatedFeeCurrency: USDT
stpId: null
stpAct: null
finishAs: filled
}
Expected Behavior:
When creating a market order and specifying a certain amount, I expect the order to execute exactly as specified. For instance, if I request 15 units of RBN, I expect the order to fulfill 15 units of RBN.
Additional Information:
It appears that the API is executing the order as a $15 USDT transaction instead of fulfilling the specified amount. This behavior is unexpected and I would appreciate assistance in resolving this issue.
Thank you.
Error: only used addresses or verified addresses are allowed for api withdrawal
Hi
I'm withdrawal api with sample code
defaultClient.setBasePath("https://api.gateio.ws/api/v4");
defaultClient.setApiKeySecret("******", "######.....");
WithdrawalApi apiInstance = new WithdrawalApi(defaultClient);
LedgerRecord ledgerRecord = new LedgerRecord(); // LedgerRecord |
ledgerRecord.setAddress("0x######################");
ledgerRecord.setCurrency("MATIC");
ledgerRecord.setAmount("2.1");
ledgerRecord.setChain("MATIC");
ledgerRecord.setMemo("");
try {
LedgerRecord result = apiInstance.withdraw(ledgerRecord);
System.out.println(result);
}
.........
result is:label: INVALID_PARAM_VALUE, message: Error: only used addresses or verified addresses are allowed for api withdrawal
what can i do?
jar包没编译吗?
maven仓库里也没这个项目啊
有没有获取现货钱包 某个币种的余额接口呢
v4文档内,只有 查询个人账户总额 的接口,返回的是账户的总余额,比方说 钱包内有 1BTC 100USDT 1000GT,这个接口返回的是这3个币种的总金额,我想的是传了指定币种参数(BTC),返回的金额应该是当前币种 的余额(1)
know about spot balance update with deposit through Websocket
How can i know when spot balance updated , this update is through trade or deposit?
现货限频规则
Gate的API文档(https://www.gate.io/docs/apiv4/zh_CN/index.html#c1fd2fc5ac)写着得限频规则是:
提现:
提现接口限制每个用户 10s 一次请求
现货:
查询请求按源 IP 限制每秒 300 次请求
合约:
私有接口的请求频率按用户限制在每秒总计 400 个请求
永续合约、交割合约共享同一个频率限制
这里写着现货的查询请求是按照IP限频的,并没有说明现货的是有接口,比如下单、撤单的限频规则。
请问现货的私有接口限频规则是什么样的?是跟合约一样,按照用户限频的吗?
Please add API for /futures/{settle}/risk_limit_tiers method
How to convert fee to USDT?
Get transaction history (Trade) for pair APRT_USDT.
when a sell operation, everything is clear here, since the fee is displayed in USDT:
class Trade {
id: 4757428860
createTime: 1671090792
createTimeMs: 1671090792679.394000
currencyPair: APRT_USDT
side: sell
role: maker
amount: 719.2
price: 0.0014169
orderId: 244554016122
fee: 0.00203806896
feeCurrency: USDT
pointFee: 0
gtFee: 0
}
But I do not understand how to convert the fee to USDT when buying, it is indicated here that the fee is in APRT
class Trade {
id: 4756751445
createTime: 1671087875
createTimeMs: 1671087875246.492000
currencyPair: APRT_USDT
side: buy
role: taker
amount: 720.66
price: 0.0013876
orderId: 244553641725
fee: 1.44132
feeCurrency: APRT
pointFee: 0
gtFee: 0
}
please show me how to convert here 1.44132 APRT => ? USDT
6.23.0 not found in maven central repository
Thanks for new version 6.23.0
Have you publish to the maven central repository? I can't see new version in MVNREPOSITORY
Order fields not filled on creation
I get:
createTime: null
updateTime: null
createTimeMs: null
updateTimeMs: null
when order is created,
Unexpected value 'PEND' by WalletApi
When I use WallApi.listDeposits, throw an exception like this:
Exception in thread "pool-5-thread-30" java.lang.IllegalArgumentException: Unexpected value 'PEND'
at io.gate.gateapi.models.LedgerRecord$StatusEnum.fromValue(LedgerRecord.java:94)
at io.gate.gateapi.models.LedgerRecord$StatusEnum$Adapter.read(LedgerRecord.java:106)
at io.gate.gateapi.models.LedgerRecord$StatusEnum$Adapter.read(LedgerRecord.java:97)
at com.google.gson.TypeAdapter$1.read(TypeAdapter.java:199)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:131)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:222)
at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:41)
at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:82)
at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:61)
at com.google.gson.Gson.fromJson(Gson.java:932)
at com.google.gson.Gson.fromJson(Gson.java:897)
at com.google.gson.Gson.fromJson(Gson.java:846)
at io.gate.gateapi.JSON.deserialize(JSON.java:142)
at io.gate.gateapi.ApiClient.deserialize(ApiClient.java:781)
at io.gate.gateapi.ApiClient.handleResponse(ApiClient.java:984)
at io.gate.gateapi.ApiClient.execute(ApiClient.java:911)
at io.gate.gateapi.api.WalletApi.listDepositsWithHttpInfo(WalletApi.java:430)
at io.gate.gateapi.api.WalletApi.access$500(WalletApi.java:38)
at io.gate.gateapi.api.WalletApi$APIlistDepositsRequest.execute(WalletApi.java:526)
at com.qkbstudio.qkminer.module.qkm.service.ex.rest.impl.GateIoRestServiceImpl.getDepositRecords(GateIoRestServiceImpl.java:121)
at com.qkbstudio.qkminer.module.qkm.job.DepositListenerJob.lambda$executeInternal$0(DepositListenerJob.java:78)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
A new StausEnum
founded but sdk not updated
OpenAPI spec file location
Hi guys
I'd like to generate the idea http client from the openapi spec that you have, but can't find anywhere the descriptor itself (neither json nor yml). Is it public available?
Thanks in advance.
java.lang.ClassNotFoundException: okio.Source
When executing the example, this error may occur, but I couldn't find this dependency package online. Have any friends encountered it
Caused by: java.lang.ClassNotFoundException: okio.Source
at java.net.URLClassLoader.findClass(URLClassLoader.java:387)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
... 2 more
Why does the amount parameter work like Price? (in v6.57.0)
io.gate.gateapi.GateApiException: label: INVALID_PROTOCOL, message: invalid argument: #4
您好,当我在创建合约的时候,服务器响应这个错误,我不能理解这个是什么意思,希望解答一下.谢谢
异常信息:
io.gate.gateapi.GateApiException: label: INVALID_PROTOCOL, message: invalid argument: #4
使用的SDK版本是6.23.2,JDK1.8,以下是我运行的代码:
@test
public void testCreateFutureOrder(){
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.gateio.ws/api/v4");
// Configure APIv4 authorization: apiv4
defaultClient.setApiKeySecret("bafc64c31ed7b8aedaa2bb6366bcd351", "");
FuturesApi apiInstance = new FuturesApi(defaultClient);
String settle = "usdt"; // String | Settle currency
FuturesOrder futuresOrder = new FuturesOrder(); // FuturesOrder |
futuresOrder.setContract("BTC_USDT");
futuresOrder.setText("t-2022032300000001");
futuresOrder.setIceberg(0L);
futuresOrder.setTif(FuturesOrder.TifEnum.IOC);
futuresOrder.setSize(10L);
try {
FuturesOrder result = apiInstance.createFuturesOrder(settle, futuresOrder);
System.out.println(result);
} catch (GateApiException e) {
System.err.println(String.format("Gate api exception, label: %s, message: %s", e.getErrorLabel(), e.getMessage()));
e.printStackTrace();
} catch (ApiException e) {
System.err.println("Exception when calling FuturesApi#createFuturesOrder");
System.err.println("Status code: " + e.getCode());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
API for query currency detail
Is there a API that I can query the currency detail? For example, I can query the BTC's full name is BitCoin.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.