Every exchange has fee tiers. What you actually pay depends on your volume, what you hold, and whatever else that venue counts — so the number on its public fees page is usually the entry-level tier, and usually not yours.Routing picks venues on what you pay, so using the published number makes it wrong on every order. SORY never reads fees from a venue. You give it yours.
fees.toml
[binance]maker_bps = 1.0taker_bps = 4.0[binance."BTC/USDT"] # optional, overrides the above for one pairmaker_bps = -1.0 # a rebate is just a negative feetaker_bps = 3.5
Two parts: where the rates live, and which venues to apply them to.
config = { "symbol": "BTC/USDT", "exchanges": ["binance", "okx", "kraken"], "fees_bps": "fees.toml", # or the same shape inline "fee_offset": {"binance": "taker", "okx": "taker"}, # kraken keeps quoted prices}
Use taker when you are crossing the spread, which is what a market order does. Use maker when you are pricing your own quote.book.all_in tells you whether the prices you are holding include fees.
Fees are optional. Leave fee_offset out and you get quoted prices everywhere, and you need no fee file at all.
FeeError: Fee schedule is incomplete, missing: okx BTC/USDT
Asking SORY to apply a fee it does not have stops the client from starting. It will not fall back to zero.That sounds strict, but a zero fee is not a small error — it produces prices that look fee-adjusted and are not, and every routing decision on that venue is quietly wrong from then on. Failing at startup is the cheap version of that problem.
bid -> bid × (1 − fee) you receive lessask -> ask × (1 + fee) you pay more
Against a quoted price of 100:
Fee
Result
Bid
taker 5 bps
99.95
you receive less
Ask
taker 5 bps
100.05
you pay more
Bid
maker −1 bp
100.01
the rebate pays you
Ask
maker −1 bp
99.99
Rebates work by sign, with no special case. There is a test pinning these exact numbers, because getting the sign wrong on a rebate breaks nothing visibly — it just makes every decision quietly backwards.Trade prints are never adjusted, even when the book is. You did not pay a fee on someone else’s trade.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"SORY","description":"A smart order router for crypto, in a Python package. Aggregate order books across every venue you trade and execute against the best all-in price.","colors":{"primary":"#2CD3BC","light":"#2CD3BC","dark":"#22C5AF"},"logo":{"light":"https://mintcdn.com/sory-61db826a/Jid9s175OqDcKEY9/logo/SORY.png?fit=max\u0026auto=format\u0026n=Jid9s175OqDcKEY9\u0026q=85\u0026s=c603beffa63b26fb140db563206ee460","dark":"https://mintcdn.com/sory-61db826a/Jid9s175OqDcKEY9/logo/SORY.png?fit=max\u0026auto=format\u0026n=Jid9s175OqDcKEY9\u0026q=85\u0026s=c603beffa63b26fb140db563206ee460","href":"https://sory.pro"},"favicon":"https://mintcdn.com/sory-61db826a/Jid9s175OqDcKEY9/logo/SORY_favicon.png?fit=max\u0026auto=format\u0026n=Jid9s175OqDcKEY9\u0026q=85\u0026s=fef4008d1f6d41dfe88b2b215928bfd2","appearance":{"default":"dark"},"background":{"decoration":"gradient"},"navbar":{"links":[{"icon":"play","href":"https://playground.sory.pro","label":"Playground"},{"icon":"package","href":"https://pypi.org/project/sory/","label":"PyPI"}],"primary":{"type":"button","label":"Get a licence key","href":"mailto:manu.de.cara@gmail.com"}},"footer":{"links":[{"header":"Documentation","items":[{"label":"Quickstart","href":"https://docs.sory.pro/quickstart"},{"label":"Playground","href":"https://playground.sory.pro"},{"label":"Venues","href":"https://docs.sory.pro/venues"},{"label":"Routing","href":"https://docs.sory.pro/routing"}]},{"header":"Product","items":[{"label":"sory.pro","href":"https://sory.pro"},{"label":"PyPI","href":"https://pypi.org/project/sory"},{"label":"Request a licence","href":"mailto:manu.de.cara@gmail.com"}]}]},"search":{"prompt":"Search venues, routing, fees…"},"seo":{"metatags":{"og:site_name":"SORY","og:type":"website"},"indexing":"navigable"},"fonts":{"heading":{"family":"Archivo","weight":700},"body":{"family":"IBM Plex Sans"}},"icons":{"library":"lucide"},"styling":{"eyebrows":"breadcrumbs","codeblocks":"dark","latex":false},"errors":{"404":{"redirect":true,"title":"No route to that page","description":"The page moved or never existed. Try the quickstart, or search above."}},"contextual":{"options":["assistant","copy","view","mcp","add-mcp","claude","cursor","vscode"],"display":"header"},"interaction":{"drilldown":true},"navigation":{"global":{"anchors":[{"anchor":"Playground","icon":"play","href":"https://playground.sory.pro"},{"anchor":"PyPI","icon":"package","href":"https://pypi.org/project/sory/"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"sory-61db826a","hasAudioNarration":false,"actualSubdomain":"sory-61db826a","customDomains":["docs.sory.pro"],"gitSource":{"type":"github","owner":"manudc-scope","repo":"sory","deployBranch":"main","contentDirectory":"docs","isPrivate":true,"mountPath":"","label":""},"chroma":{"latestBuiltDeploymentHistoryId":"6ad9f3138b3d16364f980466","collectionId":"ebdc9eb6-f9cc-42db-8e1a-01aada0ec02d","liveDeploymentHistoryId":"6ad9f3138b3d16364f980466","schemaVersion":"v3"},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6ad9f3138b3d16364f980466","clientVersion":"0.0.4043","searchFilterCounts":[{"language":"default","tag":"Guide","count":10},{"language":"default","tag":"Start here","count":4},{"language":"default","tag":"Core concepts","count":4},{"language":"default","tag":"Going further","count":2},{"language":"default","tag":"Venues","count":2},{"language":"default","tag":"Reference","count":2}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[],"page":{"pagePath":"fees","slug":"/fees","pageMetadata":{"title":"Fees","description":"Your rates, from a file you control.","icon":"percent","href":"/fees"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Your rates, from a file you control.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Heading,Note,Table}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Every exchange has fee tiers. What you actually pay depends on your volume, what you hold, and whatever else that venue counts — so the number on its public fees page is usually the entry-level tier, and usually not yours.`}),`\n`,_jsx(_components.p,{children:`Routing picks venues on what you pay, so using the published number makes it wrong on every order. SORY never reads fees from a venue. You give it yours.`}),`\n`,_jsx(CodeBlock,{filename:`fees.toml`,numberOfLines:`7`,language:`toml`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`toml`,children:_jsxs(_components.code,{language:`toml`,numberOfLines:`7`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`[binance]`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`maker_bps`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` = `}),_jsx(_components.span,{style:{color:`#B5CEA8`,\"--shiki-dark\":`#B5CEA8`},children:`1.0`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`taker_bps`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` = `}),_jsx(_components.span,{style:{color:`#B5CEA8`,\"--shiki-dark\":`#B5CEA8`},children:`4.0`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`[binance.\"BTC/USDT\"] `}),_jsx(_components.span,{style:{color:`#6A9955`,\"--shiki-dark\":`#6A9955`},children:`# optional, overrides the above for one pair`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`maker_bps`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` = `}),_jsx(_components.span,{style:{color:`#B5CEA8`,\"--shiki-dark\":`#B5CEA8`},children:`-1.0`}),_jsx(_components.span,{style:{color:`#6A9955`,\"--shiki-dark\":`#6A9955`},children:` # a rebate is just a negative fee`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`taker_bps`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` = `}),_jsx(_components.span,{style:{color:`#B5CEA8`,\"--shiki-dark\":`#B5CEA8`},children:`3.5`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`turning-them-on`,children:`Turning them on`}),`\n`,_jsx(_components.p,{children:`Two parts: where the rates live, and which venues to apply them to.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`6`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`config = {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"symbol\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"BTC/USDT\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"exchanges\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"binance\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"okx\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"kraken\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"fees_bps\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"fees.toml\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6A9955`,\"--shiki-dark\":`#6A9955`},children:`# or the same shape inline`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"fee_offset\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: {`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"binance\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"taker\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"okx\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"taker\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`}, `}),_jsx(_components.span,{style:{color:`#6A9955`,\"--shiki-dark\":`#6A9955`},children:`# kraken keeps quoted prices`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Use `,_jsx(_components.strong,{children:`taker`}),` when you are crossing the spread, which is what a market order does. Use `,_jsx(_components.strong,{children:`maker`}),` when you are pricing your own quote.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`book.all_in`}),` tells you whether the prices you are holding include fees.`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`Fees are optional. Leave `,_jsx(_components.code,{children:`fee_offset`}),` out and you get quoted prices everywhere, and you need no fee file at all.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`if-a-rate-is-missing`,children:`If a rate is missing`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`FeeError: Fee schedule is incomplete, missing: okx BTC/USDT`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(_components.p,{children:`Asking SORY to apply a fee it does not have stops the client from starting. It will not fall back to zero.`}),`\n`,_jsx(_components.p,{children:`That sounds strict, but a zero fee is not a small error — it produces prices that look fee-adjusted and are not, and every routing decision on that venue is quietly wrong from then on. Failing at startup is the cheap version of that problem.`}),`\n`,_jsx(Heading,{level:`2`,id:`the-arithmetic`,children:`The arithmetic`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`3`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`bid -> bid × (1 − fee) you receive less`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`ask -> ask × (1 + fee) you pay more`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(_components.p,{children:`Against a quoted price of 100:`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{}),_jsx(_components.th,{children:`Fee`}),_jsx(_components.th,{children:`Result`}),_jsx(_components.th,{})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Bid`}),_jsx(_components.td,{children:`taker 5 bps`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`99.95`}),_jsx(_components.td,{children:`you receive less`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Ask`}),_jsx(_components.td,{children:`taker 5 bps`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`100.05`}),_jsx(_components.td,{children:`you pay more`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Bid`}),_jsx(_components.td,{children:`maker −1 bp`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`100.01`}),_jsx(_components.td,{children:`the rebate pays you`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Ask`}),_jsx(_components.td,{children:`maker −1 bp`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`99.99`}),_jsx(_components.td,{})]})]})]}),`\n`,_jsx(_components.p,{children:`Rebates work by sign, with no special case. There is a test pinning these exact numbers, because getting the sign wrong on a rebate breaks nothing visibly — it just makes every decision quietly backwards.`}),`\n`,_jsx(_components.p,{children:`Trade prints are never adjusted, even when the book is. You did not pay a fee on someone else’s trade.`})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":"dark","config":{},"pageMetadata":{"title":"Fees","description":"Your rates, from a file you control.","icon":"percent","href":"/fees"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Turning them on","slug":"turning-them-on","depth":2,"children":[]},{"title":"If a rate is missing","slug":"if-a-rate-is-missing","depth":2,"children":[]},{"title":"The arithmetic","slug":"the-arithmetic","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"sory-61db826a","siteName":"SORY","title":"Fees - SORY","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-08-04T08:01:37.587Z","originalFileLocation":"fees.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"dark\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Your rates, from a file you control.\">\u003cmeta data-mint-head name=\"application-name\" content=\"SORY\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/sory-61db826a/3d9WrtySx8t-DdB-/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/sory-61db826a/3d9WrtySx8t-DdB-/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/sory-61db826a/3d9WrtySx8t-DdB-/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/sory-61db826a/3d9WrtySx8t-DdB-/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/sory-61db826a/3d9WrtySx8t-DdB-/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/sory-61db826a/3d9WrtySx8t-DdB-/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/sory-61db826a/3d9WrtySx8t-DdB-/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/sory-61db826a/3d9WrtySx8t-DdB-/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/sory-61db826a/3d9WrtySx8t-DdB-/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Fees - SORY\">\u003cmeta data-mint-head property=\"og:description\" content=\"Your rates, from a file you control.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"SORY\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.sory.pro/fees\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://sory-61db826a.mintlify.app/_mintlify/api/og/v2?division=Core+concepts\u0026amp;title=Fees\u0026amp;description=Your+rates%2C+from+a+file+you+control.\u0026amp;theme=a3470f88b541c0a795f05284\u0026amp;signature=a1ebbf65303fed75be7c0d16e754d221ae2dffe9eb94ed3f73cbe4a5c136236f\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Fees - SORY\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Your rates, from a file you control.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://sory-61db826a.mintlify.app/_mintlify/api/og/v2?division=Core+concepts\u0026amp;title=Fees\u0026amp;description=Your+rates%2C+from+a+file+you+control.\u0026amp;theme=a3470f88b541c0a795f05284\u0026amp;signature=a1ebbf65303fed75be7c0d16e754d221ae2dffe9eb94ed3f73cbe4a5c136236f\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/sory-61db826a/3d9WrtySx8t-DdB-/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"SORY\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#2CD3BC\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.sory.pro/fees\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/fees.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.sory.pro/#organization\",\"name\":\"SORY\",\"url\":\"https://docs.sory.pro\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/sory-61db826a/Jid9s175OqDcKEY9/logo/SORY.png?fit=max\u0026auto=format\u0026n=Jid9s175OqDcKEY9\u0026q=85\u0026s=c603beffa63b26fb140db563206ee460\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.sory.pro#website\",\"name\":\"SORY\",\"url\":\"https://docs.sory.pro\",\"publisher\":{\"@id\":\"https://docs.sory.pro/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.sory.pro/fees#webpage\",\"url\":\"https://docs.sory.pro/fees\",\"name\":\"Fees\",\"description\":\"Your rates, from a file you control.\",\"dateModified\":\"2026-08-04T08:01:37.587Z\",\"isPartOf\":{\"@id\":\"https://docs.sory.pro#website\"},\"breadcrumb\":{\"@id\":\"https://docs.sory.pro/fees#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.sory.pro/fees#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Core concepts\",\"item\":\"https://docs.sory.pro/market-data\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Fees\",\"item\":\"https://docs.sory.pro/fees\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.sory.pro/fees#article\",\"headline\":\"Fees\",\"name\":\"Fees\",\"description\":\"Your rates, from a file you control.\",\"url\":\"https://docs.sory.pro/fees\",\"mainEntityOfPage\":{\"@id\":\"https://docs.sory.pro/fees#webpage\"},\"dateModified\":\"2026-08-04T08:01:37.587Z\",\"publisher\":{\"@id\":\"https://docs.sory.pro/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.sory.pro#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"SORY\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"SORY","nav":{"global":{"anchors":[{"anchor":"Playground","icon":"play","href":"https://playground.sory.pro"},{"anchor":"PyPI","icon":"package","href":"https://pypi.org/project/sory/"}]},"tabs":[{"tab":"Guide","icon":"book-open","groups":[{"group":"Start here","icon":"play","expanded":true,"pages":[{"title":"SORY","sidebarTitle":"Introduction","icon":"compass","href":"/introduction"},{"title":"Quickstart","icon":"rocket","href":"/quickstart"},{"title":"Configuration","icon":"cog","href":"/configurations"},{"title":"Licensing","icon":"key","href":"/licensing"}]},{"group":"Core concepts","icon":"boxes","expanded":true,"pages":[{"title":"Market data","icon":"layers","href":"/market-data"},{"title":"Routing","icon":"split","href":"/routing"},{"title":"Execution","description":"Send an order. Get back exactly what went where.","icon":"send","href":"/order-execution"},{"title":"Fees","icon":"percent","href":"/fees"}]},{"group":"Going further","icon":"compass","expanded":true,"pages":[{"title":"Cross-exchange market making","description":"Quote on one set of venues, hedge on another. About forty lines.","icon":"repeat","href":"/market-making"},{"title":"Errors","icon":"triangle-alert","href":"/errors"}]}]},{"tab":"Venues","icon":"building-2","pages":[{"title":"Venues","href":"/symbols"}]}]},"basePath":"","title":"Fees - SORY","buildId":"dpl_G9nrg4qeJSZtah1Ziwbc2n6WkLch","deploymentId":"dpl_G9nrg4qeJSZtah1Ziwbc2n6WkLch","dynamics":[],"chunks":[]}