Skip to content

API Reference


API Reference / SquareOffAllSkill

Class: SquareOffAllSkill

Defined in: src/skills/builtin/positionManagement.ts:20

Exit every open position at market.

Destructive and irreversible during market hours, hence destructive_write — it needs orders:write and the live-trading gate.

Extends

Constructors

Constructor

new SquareOffAllSkill(): SquareOffAllSkill

Returns

SquareOffAllSkill

Inherited from

Skill.constructor

Properties

definition

readonly definition: SkillDefinition

Defined in: src/skills/builtin/positionManagement.ts:21

Overrides

Skill.definition

Methods

call()

call(args, client): Promise<PositionContext>

Defined in: src/skills/Skill.ts:58

Runs every step in order and returns the final context.

Parameters

args

Record<string, unknown>

client

DhanClient

Returns

Promise<PositionContext>

Inherited from

Skill.call


stepNames()

stepNames(): string[]

Defined in: src/skills/Skill.ts:73

Step names in execution order, for tool listings and docs.

Returns

string[]

Inherited from

Skill.stepNames


buildContext()

protected buildContext(args, client): PositionContext

Defined in: src/skills/Skill.ts:77

Parameters

args

Record<string, unknown>

client

DhanClient

Returns

PositionContext

Inherited from

Skill.buildContext


validate()

protected validate(context): void

Defined in: src/skills/Skill.ts:91

Parameters

context

Record<string, unknown>

Returns

void

Inherited from

Skill.validate


steps()

protected steps(): SkillStep<PositionContext>[]

Defined in: src/skills/builtin/positionManagement.ts:29

Returns

SkillStep<PositionContext>[]

Overrides

Skill.steps

Community project — not affiliated with Dhan. MIT License.