Skip to content

support configure apiKey and secret key in program parameter #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.idea
contract-java-demo/contract-java-demo-root.iml
contract-java-demo/contract-java-demo/contract-java-demo.iml
contract-java-demo/contract-java-demo/target/
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ public static void main(String[] args) throws HttpException, IOException {
*/
String api_key = ""; // huobi申请的apiKey
String secret_key = ""; // huobi申请的secretKey
if (args.length < 2 && api_key.equalsIgnoreCase("") && secret_key.equalsIgnoreCase("")) {
System.out.println("Please input api_key and secret_key");
} else {
api_key = args[0];
secret_key = args[1];
}
String url_prex = "https://api.hbdm.com";//火币api接口地址https://api.hbdm.com
IHbdmRestApi futureGetV1 = new HbdmRestApiV1(url_prex);
IHbdmRestApi futurePostV1 = new HbdmRestApiV1(url_prex, api_key, secret_key);
Expand Down
1 change: 0 additions & 1 deletion contract-java-demo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
</parent>

<modules>

<module>contract-java-demo</module>
</modules>

Expand Down
15 changes: 15 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>


<groupId>com.huobi.api</groupId>
<artifactId>Futures-Java-demo</artifactId>
<version>0.0.1-SNAPSHOT</version>

<modules>
<module>contract-java-demo</module>
</modules>
</project>