Preparing search index...
The search index is not available
handle-sdk
handle-sdk
trade
reader
TradeReaderSubgraph
Class TradeReaderSubgraph
Hierarchy
TradeReaderSubgraph
Implements
TradeReader
Index
Constructors
constructor
Properties
api
Url
graph
Url
Methods
get
Account
get
Deposit
Withdraw
History
get
Historical
Lp
Pair
Volumes
get
Liquidity
Pools
get
Positions
get
System
Param
get
System
Params
get
Trade
Gas
Fee
Usd
get
Trade
History
get
User
Account
Ids
get
Withdraw
Gas
Fee
Usd
Constructors
constructor
new
Trade
Reader
Subgraph
(
graphUrl
,
apiUrl
)
:
TradeReaderSubgraph
Parameters
graphUrl
:
string
apiUrl
:
string
Returns
TradeReaderSubgraph
Properties
Private
api
Url
api
Url
:
string
Private
graph
Url
graph
Url
:
string
Methods
get
Account
get
Account
(
accountId
)
:
Promise
<
ReaderAccountResponse
>
Parameters
accountId
:
number
Returns
Promise
<
ReaderAccountResponse
>
get
Deposit
Withdraw
History
get
Deposit
Withdraw
History
(
accountId
,
limit
,
offset
)
:
Promise
<
ReaderDepositWithdrawHistory
>
Parameters
accountId
:
number
limit
:
number
offset
:
number
Returns
Promise
<
ReaderDepositWithdrawHistory
>
get
Historical
Lp
Pair
Volumes
get
Historical
Lp
Pair
Volumes
(
limit
,
offset
,
liquidityPoolId
,
pair
?
)
:
Promise
<
ReaderHistoricalLpPairVolume
[]
>
Parameters
limit
:
number
offset
:
number
liquidityPoolId
:
string
Optional
pair
:
string
Optional
Returns
Promise
<
ReaderHistoricalLpPairVolume
[]
>
get
Liquidity
Pools
get
Liquidity
Pools
(
)
:
Promise
<
ReaderLiquidityPool
[]
>
Returns
Promise
<
ReaderLiquidityPool
[]
>
get
Positions
get
Positions
(
limit
,
offset
,
__namedParameters
?
)
:
Promise
<
ReaderSubgraphPosition
[]
>
Parameters
limit
:
number
offset
:
number
__namedParameters
:
ReaderGetPositionsOptions
= {}
Returns
Promise
<
ReaderSubgraphPosition
[]
>
get
System
Param
get
System
Param
(
paramId
)
:
Promise
<
BigNumber
>
Parameters
paramId
:
string
Returns
Promise
<
BigNumber
>
get
System
Params
get
System
Params
(
)
:
Promise
<
SystemParams
>
Returns
Promise
<
SystemParams
>
get
Trade
Gas
Fee
Usd
get
Trade
Gas
Fee
Usd
(
)
:
Promise
<
BigNumber
>
Returns
Promise
<
BigNumber
>
get
Trade
History
get
Trade
History
(
accountId
,
page
)
:
Promise
<
{
accountId
:
number
;
accountUser
:
string
;
createdTimestampUnixMillis
:
number
;
expiryTimestampUnixMillis
:
number
;
id
:
string
;
kind
:
(
(
{ kind: "market"; }
)
|
(
{ kind: "limit"; args: { limitPrice: BigNumber; }; }
)
|
(
{ kind: "stopMarket"; args: { triggerPrice: BigNumber; stopLoss?: { kind: "position"; } | { id: string; kind: "order"; } | null | undefined; }; }
)
|
(
{ kind: "stopLimit"; args: { triggerPrice: BigNumber; limitPrice: BigNumber; }; }
)
|
(
{ kind: "limitTrigger"; args: { triggerPrice: BigNumber; takeProfit?: { kind: "position"; } | { id: string; kind: "order"; } | null | undefined; }; }
)
|
(
{ kind: string; }
)
)
&
(
undefined
|
(
{ kind: "market"; }
)
|
(
{ kind: "limit"; args: { limitPrice: BigNumber; }; }
)
|
(
{ kind: "stopMarket"; args: { triggerPrice: BigNumber; stopLoss?: { kind: "position"; } | { id: string; kind: "order"; } | null | undefined; }; }
)
|
(
{ kind: "stopLimit"; args: { triggerPrice: BigNumber; limitPrice: BigNumber; }; }
)
|
(
{ kind: "limitTrigger"; args: { triggerPrice: BigNumber; takeProfit?: { kind: "position"; } | { id: string; kind: "order"; } | null | undefined; }; }
)
|
(
{ kind: string; }
)
)
;
lpId
:
string
;
nonce
:
string
;
pair
:
Pair
;
signature
:
string
;
size
:
{ amount: BigNumber; unit: "lpc" | "lot"; }
;
status
:
(
(
{ status: "open"; content: { status: "placed"; } | { status: "triggered"; content: { triggerPrice: BigNumber; timestampUnixMillis: number; }; }; }
)
|
(
{ status: "filled"; content: { price: BigNumber; timestampUnixMillis: number; settlementStatus: { status: "queued"; } | { status: "beforeTx"; } | { status: "indexing"; } | { status: "settled"; content: { ...; }; }; }; }
)
|
(
{ status: "cancelled"; content: { timestampUnixMillis: number; reason: string; userCancellation?: { address: string; nonce: string; signature: { v: number; r: string; s: string; }; } | null | undefined; }; }
)
)
&
(
undefined
|
(
{ status: "open"; content: { status: "placed"; } | { status: "triggered"; content: { triggerPrice: BigNumber; timestampUnixMillis: number; }; }; }
)
|
(
{ status: "filled"; content: { price: BigNumber; timestampUnixMillis: number; settlementStatus: { status: "queued"; } | { status: "beforeTx"; } | { status: "indexing"; } | { status: "settled"; content: { ...; }; }; }; }
)
|
(
{ status: "cancelled"; content: { timestampUnixMillis: number; reason: string; userCancellation?: { address: string; nonce: string; signature: { v: number; r: string; s: string; }; } | null | undefined; }; }
)
)
;
}
[]
>
Gets the trade history for a trade account.
Parameters
accountId
:
number
page
:
number
Returns
Promise
<
{
accountId
:
number
;
accountUser
:
string
;
createdTimestampUnixMillis
:
number
;
expiryTimestampUnixMillis
:
number
;
id
:
string
;
kind
:
(
(
{ kind: "market"; }
)
|
(
{ kind: "limit"; args: { limitPrice: BigNumber; }; }
)
|
(
{ kind: "stopMarket"; args: { triggerPrice: BigNumber; stopLoss?: { kind: "position"; } | { id: string; kind: "order"; } | null | undefined; }; }
)
|
(
{ kind: "stopLimit"; args: { triggerPrice: BigNumber; limitPrice: BigNumber; }; }
)
|
(
{ kind: "limitTrigger"; args: { triggerPrice: BigNumber; takeProfit?: { kind: "position"; } | { id: string; kind: "order"; } | null | undefined; }; }
)
|
(
{ kind: string; }
)
)
&
(
undefined
|
(
{ kind: "market"; }
)
|
(
{ kind: "limit"; args: { limitPrice: BigNumber; }; }
)
|
(
{ kind: "stopMarket"; args: { triggerPrice: BigNumber; stopLoss?: { kind: "position"; } | { id: string; kind: "order"; } | null | undefined; }; }
)
|
(
{ kind: "stopLimit"; args: { triggerPrice: BigNumber; limitPrice: BigNumber; }; }
)
|
(
{ kind: "limitTrigger"; args: { triggerPrice: BigNumber; takeProfit?: { kind: "position"; } | { id: string; kind: "order"; } | null | undefined; }; }
)
|
(
{ kind: string; }
)
)
;
lpId
:
string
;
nonce
:
string
;
pair
:
Pair
;
signature
:
string
;
size
:
{ amount: BigNumber; unit: "lpc" | "lot"; }
;
status
:
(
(
{ status: "open"; content: { status: "placed"; } | { status: "triggered"; content: { triggerPrice: BigNumber; timestampUnixMillis: number; }; }; }
)
|
(
{ status: "filled"; content: { price: BigNumber; timestampUnixMillis: number; settlementStatus: { status: "queued"; } | { status: "beforeTx"; } | { status: "indexing"; } | { status: "settled"; content: { ...; }; }; }; }
)
|
(
{ status: "cancelled"; content: { timestampUnixMillis: number; reason: string; userCancellation?: { address: string; nonce: string; signature: { v: number; r: string; s: string; }; } | null | undefined; }; }
)
)
&
(
undefined
|
(
{ status: "open"; content: { status: "placed"; } | { status: "triggered"; content: { triggerPrice: BigNumber; timestampUnixMillis: number; }; }; }
)
|
(
{ status: "filled"; content: { price: BigNumber; timestampUnixMillis: number; settlementStatus: { status: "queued"; } | { status: "beforeTx"; } | { status: "indexing"; } | { status: "settled"; content: { ...; }; }; }; }
)
|
(
{ status: "cancelled"; content: { timestampUnixMillis: number; reason: string; userCancellation?: { address: string; nonce: string; signature: { v: number; r: string; s: string; }; } | null | undefined; }; }
)
)
;
}
[]
>
get
User
Account
Ids
get
User
Account
Ids
(
userAddress
,
userRole
)
:
Promise
<
number
[]
>
Parameters
userAddress
:
string
userRole
:
TradeAccountRole
Returns
Promise
<
number
[]
>
get
Withdraw
Gas
Fee
Usd
get
Withdraw
Gas
Fee
Usd
(
)
:
Promise
<
BigNumber
>
Returns
Promise
<
BigNumber
>
Settings
Member Visibility
Protected
Private
Inherited
External
Theme
OS
Light
Dark
On This Page
constructor
api
Url
graph
Url
get
Account
get
Deposit
Withdraw
History
get
Historical
Lp
Pair
Volumes
get
Liquidity
Pools
get
Positions
get
System
Param
get
System
Params
get
Trade
Gas
Fee
Usd
get
Trade
History
get
User
Account
Ids
get
Withdraw
Gas
Fee
Usd
handle-
sdk
Price
Point
Quote
fetch
Token
Price
Usd
Convert
Utils
governance
h2so
incentives
prices
referrals
rewards
trade
AMOUNT_
DECIMALS
PRICE_
DECIMALS
platforms
reader
Reader
Periodic
Position
Fee
Type
Trade
Reader
Subgraph
Trade
Reader
Reader
Account
Asset
Deposit
Reader
Account
Asset
Withdrawal
Reader
Account
Response
Reader
Account
Role
Query
Reader
Account
User
Accounts
Query
Reader
Api
Account
Reader
Api
Position
Reader
Deposit
Withdraw
History
Reader
Get
Positions
Options
Reader
Get
Trades
Options
Reader
Historical
Lp
Pair
Volume
Reader
Liquidity
Pool
Reader
Liquidity
Pool
Open
Interest
Reader
Meta
Reader
Periodic
Position
Fee
Collection
Reader
Subgraph
Position
Reader
System
Param
System
Params
AMOUNT_
DECIMALS
AMOUNT_
UNIT
PRICE_
DECIMALS
PRICE_
UNIT
format
Amount
format
Price
parse
Amount
parse
Price
Trade
Account
Role
Liquidity
Pool
Single
Market
Price
Open
Interest
Trade
Account
Trade
Adapter
Websocket
Trade
Lp
Price
Feed
H2so
Trade
Pair
Trade
Pair
Id
Trade
Protocol
Trade
Adapter
Trade
Liquidity
Pool
Trade
Lp
Price
Feed
Account
Listener
Account
Open
Args
Account
Subscription
Content
Active
Order
Adapter
Config
Availability
Available
Liquidity
Cancel
Order
Args
Clear
System
Param
Args
Deposit
Args
Deposit
Or
Withdrawal
Deposit
Response
Get
Availability
Args
Get
Available
Liquidity
Args
Get
Margin
Args
Get
Roles
Args
Get
Subgraph
History
Args
Get
Trade
History
Args
Get
Trade
Price
Args
Grant
Account
User
Role
Response
Grant
Role
Args
H2SOPair
Data
Instrument
Instrument
Schema
Lp
Config
Update
Response
Lp
Id
Lp
Listener
Lp
Pair
Publication
Lp
Pair
Tradeability
Listener
Lp
Place
Order
Args
Lp
Place
Order
Args
With
Expiry
Timestamp
Lp
Publication
Lp
Replace
Order
Args
Market
Price
Callback
Market
Price
Subscription
Open
Account
Response
Order
Publication
Listener
Order
Replacement
Result
Periodic
Fee
Place
Order
Args
Place
Order
Response
Publication
Response
Replace
Order
Args
Replace
Order
Response
Request
Response
Revoke
Account
User
Role
Response
Revoke
Role
Args
Serialized
Big
Decimal
Market
Side
Serialized
Lp
Pair
Serialized
Pair
State
Serialized
Position
Serialized
Timestamped
Big
Decimal
Market
Side
Set
System
Param
Args
Simulate
Trade
Args
Subscribe
Market
Price
Args
Subscription
Listener
Subscription
Response
Trade
Effect
Trade
Pair
Id
State
Trade
Response
Trade
Simulation
Trade
Subscription
Id
Transfer
Args
Websocket
Listener
Withdraw
Args
Withdraw
Response
Instrument
Schema
market
Types
get
Order
Nonce
Uuid
utils
BridgeSDK
CollateralsSDK
ConvertSDK
Fx
Keeper
PoolSDK
Fx
TokensSDK
GraphSDK
Handle
Token
Manager
Lp
StakingSDK
ProtocolSDK
Single
Collateral
Vault
Controller
Token
Manager
Vault
Controller
VaultsSDK
Token
Info
Token
List
Any
Lp
Staking
Bridge
Network
Bridge
Network
Map
Collateral
Collateral
Symbol
Collateral
Symbol
With
Native
Fx
Keeper
Pool
Pool
Fx
Token
Fx
Token
Symbol
Governance
Lock
Data
Indexed
Fx
Keeper
Pool
Indexed
Fx
Token
Indexed
Vault
Kashi
Pool
Config
Lp
Lp
Data
Lp
Platform
Lp
Staking
Data
Lp
Staking
Name
Network
Network
Map
Pending
Withdrawal
Protocol
Parameters
Reward
Pool
Data
Reward
Pool
Raw
Single
Collateral
Vault
Single
Collateral
Vault
Network
Single
Collateral
Vault
Network
Map
Single
Collateral
Vault
Symbol
Vault
H2SO_
API_
WS_
URL
H2SO_
PRICE_
DECIMALS
NETWORK_
NAMES
NETWORK_
NAME_
TO_
CHAIN_
ID
SECONDS_
IN_
A_
YEAR_
BN
SINGLE_
COLLATERAL_
NETWORK_
NAMES
config
vault
Utils
get
Is
Kashi
Approved
get
Network
Name
sign
Kashi
Approval
Generated using
TypeDoc
Gets the trade history for a trade account.