-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
60 changed files
with
3,009 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import '../../loadEnv' | ||
|
||
import { Hemes } from '@hemes/core' | ||
import { IQOptionProvider } from '@hemes/iqoption' | ||
|
||
async function run() { | ||
const hemes = new Hemes(IQOptionProvider).getProvider() | ||
|
||
const account = await hemes.logIn({ | ||
email: String(process.env.TEST_IQOPTION_ACCOUNT_EMAIL), | ||
password: String(process.env.TEST_IQOPTION_ACCOUNT_PASSWORD), | ||
}) | ||
|
||
const profit = await account.getActiveProfit( | ||
'EURUSD-OTC', | ||
'binary-option', | ||
'm1' | ||
) | ||
|
||
console.log('\n', 'Active profit:', profit, '\n') | ||
} | ||
|
||
run() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import '../../loadEnv' | ||
|
||
import { Hemes } from '@hemes/core' | ||
import { IQOptionProvider } from '@hemes/iqoption' | ||
|
||
async function run() { | ||
const hemes = new Hemes(IQOptionProvider).getProvider() | ||
|
||
const account = await hemes.logIn({ | ||
email: String(process.env.TEST_IQOPTION_ACCOUNT_EMAIL), | ||
password: String(process.env.TEST_IQOPTION_ACCOUNT_PASSWORD), | ||
}) | ||
|
||
const placedPosition = await account.placeDigitalOption({ | ||
active: 'EURUSD', | ||
direction: 'call', | ||
expiration_period: 'm1', | ||
price: 1, | ||
}) | ||
|
||
const position = await account.getPosition(placedPosition.id) | ||
|
||
console.log('\n', 'Position:', JSON.stringify(position), '\n') | ||
} | ||
|
||
run() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import '../../loadEnv' | ||
|
||
import { Hemes } from '@hemes/core' | ||
import { IQOptionProvider } from '@hemes/iqoption' | ||
|
||
async function run() { | ||
const hemes = new Hemes(IQOptionProvider).getProvider() | ||
|
||
const account = await hemes.logIn({ | ||
email: String(process.env.TEST_IQOPTION_ACCOUNT_EMAIL), | ||
password: String(process.env.TEST_IQOPTION_ACCOUNT_PASSWORD), | ||
}) | ||
|
||
const isEnabled = await account.isActiveEnabled( | ||
'EURUSD', | ||
'binary-option', | ||
'm1' | ||
) | ||
|
||
console.log('\n', 'Is active enabled:', isEnabled, '\n') | ||
} | ||
|
||
run() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import '../../loadEnv' | ||
|
||
import { Hemes } from '@hemes/core' | ||
import { IQOptionProvider } from '@hemes/iqoption' | ||
|
||
async function run() { | ||
const hemes = new Hemes(IQOptionProvider).getProvider() | ||
|
||
const account = await hemes.logIn({ | ||
email: String(process.env.TEST_IQOPTION_ACCOUNT_EMAIL), | ||
password: String(process.env.TEST_IQOPTION_ACCOUNT_PASSWORD), | ||
}) | ||
|
||
const position = await account.openBinaryOption({ | ||
active: 'EURUSD', | ||
direction: 'call', | ||
expiration_period: 'm5', | ||
price: 1, | ||
}) | ||
|
||
console.log('\n', 'Position:', JSON.stringify(position), '\n') | ||
} | ||
|
||
run() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import '../../loadEnv' | ||
|
||
import { Hemes } from '@hemes/core' | ||
import { IQOptionProvider } from '@hemes/iqoption' | ||
|
||
async function run() { | ||
const hemes = new Hemes(IQOptionProvider).getProvider() | ||
|
||
const account = await hemes.logIn({ | ||
email: String(process.env.TEST_IQOPTION_ACCOUNT_EMAIL), | ||
password: String(process.env.TEST_IQOPTION_ACCOUNT_PASSWORD), | ||
}) | ||
|
||
const position = await account.placeDigitalOption({ | ||
active: 'EURUSD', | ||
direction: 'call', | ||
expiration_period: 'm15', | ||
price: 1, | ||
}) | ||
|
||
console.log('\n', 'Position:', JSON.stringify(position), '\n') | ||
} | ||
|
||
run() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import '../../loadEnv' | ||
|
||
import { Hemes } from '@hemes/core' | ||
import { IQOptionProvider } from '@hemes/iqoption' | ||
|
||
async function run() { | ||
const hemes = new Hemes(IQOptionProvider).getProvider() | ||
|
||
const account = await hemes.logIn({ | ||
email: String(process.env.TEST_IQOPTION_ACCOUNT_EMAIL), | ||
password: String(process.env.TEST_IQOPTION_ACCOUNT_PASSWORD), | ||
}) | ||
|
||
await account.setBalanceMode('practice') | ||
|
||
const profile = await account.getProfile() | ||
|
||
console.log('\n', 'Balance:', profile.balance) | ||
console.log('Balance ID:', profile.balance_id, profile.balance_type) | ||
console.log('Balance type:', profile.balance_type, '\n') | ||
} | ||
|
||
run() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import '../../loadEnv' | ||
|
||
import { Hemes } from '@hemes/core' | ||
import { IQOptionProvider, BaseIQOptionProvider } from '@hemes/iqoption' | ||
|
||
async function run() { | ||
const hemes = new Hemes(IQOptionProvider).getProvider<BaseIQOptionProvider>() | ||
|
||
const account = await hemes.logIn({ | ||
email: String(process.env.TEST_IQOPTION_ACCOUNT_EMAIL), | ||
password: String(process.env.TEST_IQOPTION_ACCOUNT_PASSWORD), | ||
}) | ||
|
||
const profit = await account.getActiveProfit( | ||
'EURUSD-OTC', | ||
'binary-option', | ||
'm1' | ||
) | ||
|
||
console.log('\n', 'Active profit:', profit, '\n') | ||
} | ||
|
||
run() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import '../../loadEnv' | ||
|
||
import { Hemes, sleep } from '@hemes/core' | ||
import { IQOptionProvider, BaseIQOptionProvider } from '@hemes/iqoption' | ||
|
||
async function run() { | ||
const hemes = new Hemes(IQOptionProvider).getProvider<BaseIQOptionProvider>() | ||
|
||
const account = await hemes.logIn({ | ||
email: String(process.env.TEST_IQOPTION_ACCOUNT_EMAIL), | ||
password: String(process.env.TEST_IQOPTION_ACCOUNT_PASSWORD), | ||
}) | ||
|
||
const placedPosition = await account.placeDigitalOption({ | ||
active: 'EURUSD', | ||
direction: 'call', | ||
expiration_period: 'm1', | ||
price: 1, | ||
}) | ||
|
||
await sleep(100000) | ||
|
||
const position = await account.getPosition(placedPosition.id) | ||
|
||
console.log('\n', 'Position:', JSON.stringify(position), '\n') | ||
} | ||
|
||
run() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import '../../loadEnv' | ||
|
||
import { Hemes } from '@hemes/core' | ||
import { IQOptionProvider, BaseIQOptionProvider } from '@hemes/iqoption' | ||
|
||
async function run() { | ||
const hemes = new Hemes(IQOptionProvider).getProvider<BaseIQOptionProvider>() | ||
|
||
const account = await hemes.logIn({ | ||
email: String(process.env.TEST_IQOPTION_ACCOUNT_EMAIL), | ||
password: String(process.env.TEST_IQOPTION_ACCOUNT_PASSWORD), | ||
}) | ||
|
||
const isEnabled = await account.isActiveEnabled( | ||
'EURUSD', | ||
'binary-option', | ||
'm1' | ||
) | ||
|
||
console.log('\n', 'Is active enabled:', isEnabled, '\n') | ||
} | ||
|
||
run() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import '../../loadEnv' | ||
|
||
import { Hemes } from '@hemes/core' | ||
import { IQOptionProvider, BaseIQOptionProvider } from '@hemes/iqoption' | ||
|
||
async function run() { | ||
const hemes = new Hemes(IQOptionProvider).getProvider<BaseIQOptionProvider>() | ||
|
||
const account = await hemes.logIn({ | ||
email: String(process.env.TEST_IQOPTION_ACCOUNT_EMAIL), | ||
password: String(process.env.TEST_IQOPTION_ACCOUNT_PASSWORD), | ||
}) | ||
|
||
const position = await account.openBinaryOption({ | ||
active: 'EURUSD', | ||
direction: 'call', | ||
expiration_period: 'm5', | ||
price: 1, | ||
}) | ||
|
||
console.log('\n', 'Position:', JSON.stringify(position), '\n') | ||
} | ||
|
||
run() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import '../../loadEnv' | ||
|
||
import { Hemes } from '@hemes/core' | ||
import { IQOptionProvider, BaseIQOptionProvider } from '@hemes/iqoption' | ||
|
||
async function run() { | ||
const hemes = new Hemes(IQOptionProvider).getProvider<BaseIQOptionProvider>() | ||
|
||
const account = await hemes.logIn({ | ||
email: String(process.env.TEST_IQOPTION_ACCOUNT_EMAIL), | ||
password: String(process.env.TEST_IQOPTION_ACCOUNT_PASSWORD), | ||
}) | ||
|
||
const position = await account.placeDigitalOption({ | ||
active: 'EURUSD', | ||
direction: 'call', | ||
expiration_period: 'm15', | ||
price: 1, | ||
}) | ||
|
||
console.log('\n', 'Position:', JSON.stringify(position), '\n') | ||
} | ||
|
||
run() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import '../../loadEnv' | ||
|
||
import { Hemes } from '@hemes/core' | ||
import { IQOptionProvider, BaseIQOptionProvider } from '@hemes/iqoption' | ||
|
||
async function run() { | ||
const hemes = new Hemes(IQOptionProvider).getProvider<BaseIQOptionProvider>() | ||
|
||
const account = await hemes.logIn({ | ||
email: String(process.env.TEST_IQOPTION_ACCOUNT_EMAIL), | ||
password: String(process.env.TEST_IQOPTION_ACCOUNT_PASSWORD), | ||
}) | ||
|
||
await account.setBalanceMode('practice') | ||
|
||
const profile = await account.getProfile() | ||
|
||
console.log('\n', 'Balance:', profile.balance) | ||
console.log('Balance ID:', profile.balance_id, profile.balance_type) | ||
console.log('Balance type:', profile.balance_type, '\n') | ||
} | ||
|
||
run() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.